From a360e02da292fd0a89e9f15fc889a0d8e435318e Mon Sep 17 00:00:00 2001 From: Philip Oakley Date: Wed, 29 May 2019 17:16:49 +0100 Subject: [PATCH] doc: CodingGuidelines: use -1 for unspecified cli options This documents previous folk wisdom as discussed in https://public-inbox.org/git/xmqq7ecw7vbb.fsf@gitster-ct.c.googlers.com/. Raised recently in https://github.com/gitgitgadget/git/issues/201 and #237. Signed-off-by: Philip Oakley --- Documentation/CodingGuidelines | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 8579530710a7e2..2715a1879fd684 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -198,6 +198,9 @@ For C programs: including old ones. That means that you should not use C99 initializers, even if a lot of compilers grok it. + - the convention is to use -1 for unspecified values of command-line + options of config settings. + - Variables have to be declared at the beginning of the block. - NULL pointers shall be written as NULL, not as 0.