git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] CodingGuidelines: document // comments

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 12, 2026, 07:05 UTC
Message-ID
<aY17sNHtr9ZM9qOr@pks.im>
In-Reply-To
<xmqqikc3t7hf.fsf@gitster.g>
On Wed, Feb 11, 2026 at 11:17:48AM -0800, Junio C Hamano wrote:
Show 21 quoted lines
> 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.
Makes sense and looks good to me. Thanks!
Patrick
Previous: Junio C Hamano
Message 2 of 2 in “CodingGuidelines: document // comments”
  1. CodingGuidelines: document // commentsJunio C Hamano, Feb 11, 2026
  2. Patrick SteinhardtFeb 12, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.