From: Junio C Hamano <gitster@pobox.com>
To: Collin Funk <collin.funk1@gmail.com>
Cc: git@vger.kernel.org, "Jean-Noël Avila" <jn.avila@free.fr>
Subject: Re: [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh.
Date: Tue, 03 Jun 2025 07:54:19 -0700 [thread overview]
Message-ID: <xmqqiklcri3o.fsf@gitster.g> (raw)
In-Reply-To: <45c586122afab8ae3624be6963d64e770b7396b2.1748911713.git.collin.funk1@gmail.com> (Collin Funk's message of "Mon, 2 Jun 2025 17:49:12 -0700")
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 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 ;-)
When we standardized writing negatable options this way
`--option`::
`--no-option`::
Description of `--option` that can be turned off with
`--no-option`.
instead of
`--[no-]option`::
Description of `--option` that can be turned off with
`--no-option`.
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/
Thanks.
next prev parent reply other threads:[~2025-06-03 14:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 18:41 [PATCH] completion: Make sed command that generates config-list.h portable Collin Funk
2025-06-02 19:05 ` Brad Smith
2025-06-02 19:05 ` Jean-Noël AVILA
2025-06-02 19:20 ` Collin Funk
2025-06-02 19:26 ` [PATCH v2] " Collin Funk
2025-06-02 19:49 ` Jean-Noël AVILA
2025-06-02 20:08 ` Collin Funk
2025-06-02 21:42 ` Jacob Keller
2025-06-02 22:35 ` Collin Funk
2025-06-03 0:21 ` Junio C Hamano
2025-06-03 0:49 ` [PATCH] CodingGuidelines: document formatting required by generate-configlist.sh Collin Funk
2025-06-03 14:54 ` Junio C Hamano [this message]
2025-06-03 18:56 ` Collin Funk
2025-06-03 20:43 ` Junio C Hamano
2025-06-03 22:49 ` Collin Funk
2025-06-03 22:45 ` [PATCH v2] CodingGuidelines: document formatting of similar config variables Collin Funk
2025-06-03 23:57 ` Junio C Hamano
2025-06-02 22:31 ` [PATCH v3] completion: make sed command that generates config-list.h portable Collin Funk
2025-06-02 23:05 ` Keller, Jacob E
2025-06-03 0:17 ` Junio C Hamano
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=xmqqiklcri3o.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=collin.funk1@gmail.com \
--cc=git@vger.kernel.org \
--cc=jn.avila@free.fr \
/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;
as well as URLs for NNTP newsgroup(s).