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

Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.

From
Collin Funk <collin.funk1@gmail.com>
Date
Jun 3, 2025, 18:56 UTC
Message-ID
<87sekgpsbe.fsf@gmail.com>
In-Reply-To
<xmqqiklcri3o.fsf@gitster.g>
Hi Junio,
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Collin Funk <collin.funk1@gmail.com> writes:
>
>> + When documenting multiple related `git config` variables, place them on
>> + a separate line instead of separating them by commas. For example:
>> +   core.var1::
>> +   core.var2::
>> +  	This is a description of 'core.var1' and 'core.var2'.
>
> As `core.varN` in the above example are all what the end-user would
> give literally, just like `git config` command name in the first
> sentence, they should be marked up as literal strings, i.e.
>
>     ... For example, do not write this:
>
>     `core.var1`, `core.var2`::
> 	Description common to `core.var1` and `core.var2`.
> 	
>     Instead write this:
>
>     `core.var1`::
>     `core.var2`::
> 	Description common to `core.var1` and `core.var2`.

This markup is different than what is used in Documentation/config/*.adoc though. Here is just one example:

    $ head -n 3 Documentation/config/core.adoc 
    core.fileMode::
    	Tells Git if the executable bit of files in the working tree
    	is to be honored.

That was my reasoning for writing it how I did in the patch. Are you saying that all of these should be changed? I do not have any experience with AsciiDoc so I am not sure if that is correct.

Show 15 quoted lines
>> +This format is required for the `generate-configlist.sh` script to
>> +properly generate "config-list.h".
>
> It is not wrong per-se, but this tempts people to "fix" the
> generate-configlist.sh script so that it can grok the comma
> separated list "again".  And when that fix is done and reviewed
> carelessly, we'd again break some implementations of sed the same
> way and we will come back full circle ;-)
> [...]
> we explained that the reason why we want to do so is because it is
> easier to "grep".  Does this "do not comma-list variables, but list
> them one per line" also give us better greppability, and if so we
> want to explain that way, perhaps?
>
>     $ git grep '`core\.var1`::' Documentation/config/
Yes, that is a good side affect of the change that can be documented.
I will send V2 after clarification on the other point.
Collin
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 20 in “completion: Make sed command that generates config-list.h portable.”
  1. completion: Make sed command that generates config-list.h portable.Collin Funk, Jun 2, 2025
  2. Brad SmithJun 2, 2025
  3. Jean-Noël AVILAJun 2, 2025
  4. Collin FunkJun 2, 2025
  5. completion: Make sed command that generates config-list.h portable.Collin Funk, Jun 2, 2025
  6. Jean-Noël AVILAJun 2, 2025
  7. Collin FunkJun 2, 2025
  8. Jacob KellerJun 2, 2025
  9. Collin FunkJun 2, 2025
  10. Junio C HamanoJun 3, 2025
  11. CodingGuidelines: document formatting required by generate-configlist.sh.Collin Funk, Jun 3, 2025
  12. Junio C HamanoJun 3, 2025
  13. Collin FunkJun 3, 2025
  14. Junio C HamanoJun 3, 2025
  15. Collin FunkJun 3, 2025
  16. CodingGuidelines: document formatting of similar config variables.Collin Funk, Jun 3, 2025
  17. Junio C HamanoJun 3, 2025
  18. completion: make sed command that generates config-list.h portable.Collin Funk, Jun 2, 2025
  19. Keller, Jacob EJun 2, 2025
  20. Junio C HamanoJun 3, 2025

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.