{"thread":{"id":"64981","subject":"[PATCH] CodingGuidelines: document // comments","startedAt":"2026-02-11T19:17:50Z","lastAt":"2026-02-12T07:05:25Z","messageCount":2,"participants":["Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"535793","messageId":"xmqqikc3t7hf.fsf@gitster.g","threadId":"64981","inReplyTo":null,"subject":"[PATCH] CodingGuidelines: document // comments","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-11T19:17:48Z","receivedAt":"2026-02-11T19:17:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"We do not use // comments in our C code, which is implied by the\ndescription of multi-line comment rule and its examples, but is not\nexplicitly spelled out.  Spell it out.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/CodingGuidelines | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex b358d6bfb8..507d52b0d3 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -439,6 +439,8 @@ For C programs:\n \t */\n \t_(\"Here is a translatable string explained by the above.\");\n \n+   We do not use // comments.\n+\n  - Double negation is often harder to understand than no negation\n    at all.\n \n-- \n2.53.0-247-g50a2c88be3\n\n"},{"id":"535831","messageId":"aY17sNHtr9ZM9qOr@pks.im","threadId":"64981","inReplyTo":"xmqqikc3t7hf.fsf@gitster.g","subject":"Re: [PATCH] CodingGuidelines: document // comments","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-02-12T07:05:20Z","receivedAt":"2026-02-12T07:05:25Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Feb 11, 2026 at 11:17:48AM -0800, Junio C Hamano wrote:\n> We do not use // comments in our C code, which is implied by the\n> description of multi-line comment rule and its examples, but is not\n> explicitly spelled out.  Spell it out.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/CodingGuidelines | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\n> index b358d6bfb8..507d52b0d3 100644\n> --- a/Documentation/CodingGuidelines\n> +++ b/Documentation/CodingGuidelines\n> @@ -439,6 +439,8 @@ For C programs:\n>  \t */\n>  \t_(\"Here is a translatable string explained by the above.\");\n>  \n> +   We do not use // comments.\n> +\n>   - Double negation is often harder to understand than no negation\n>     at all.\n\nMakes sense and looks good to me. Thanks!\n\nPatrick\n"}]}