From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] CodingGuidelines: document // comments
Date: Wed, 11 Feb 2026 11:17:48 -0800 [thread overview]
Message-ID: <xmqqikc3t7hf.fsf@gitster.g> (raw)
We do not use // comments in our C code, which is implied by the
description of multi-line comment rule and its examples, but is not
explicitly spelled out. Spell it out.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/CodingGuidelines | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index b358d6bfb8..507d52b0d3 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -439,6 +439,8 @@ For C programs:
*/
_("Here is a translatable string explained by the above.");
+ We do not use // comments.
+
- Double negation is often harder to understand than no negation
at all.
--
2.53.0-247-g50a2c88be3
next reply other threads:[~2026-02-11 19:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 19:17 Junio C Hamano [this message]
2026-02-12 7:05 ` [PATCH] CodingGuidelines: document // comments Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqikc3t7hf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox