From: Junio C Hamano <gitster@pobox.com>
To: Yukai Chou <muzimuzhi@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] doc: add --show-names for git config
Date: Mon, 19 Aug 2024 09:04:50 -0700 [thread overview]
Message-ID: <xmqqcym4fqhp.fsf@gitster.g> (raw)
In-Reply-To: <CAEg0tHRL9+tqY0k2GiGzhc-VgMVsHqppLRFHbc=M33R6AoLXEg@mail.gmail.com> (Yukai Chou's message of "Mon, 19 Aug 2024 08:45:02 +0800")
Yukai Chou <muzimuzhi@gmail.com> writes:
> Option "--show-names" was introduced along with the "get" subcommand
> of git-config(1) [1]. It was used in Deprecated Modes doc examples,
There is no [1].
> normal and completion tests, but not documented.
>
> It's known by both "get" and "list", though has no effect on "list".
>
> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>
> ---
I'd probably write it more like so
4e513890 (builtin/config: introduce "get" subcommand,
2024-05-06) introduced "--show-names" option that is used to
give the name of the configuraiton variable to each output entry
in addition to the value. It however forgot to document it,
even though the option is used in a few examples.
Document it.
if I were doing this commit.
> +--show-names::
> + Output also the names of config variables for `list` or
> + `get`.
Considering how long the later "Find the color setting" line is, I
think it is better to write that on a single line, i.e.
> + Output also the names of config variables for `list` or `get`.
It fills only 66-column counting the quote "> " and diff formatting
"+".
> +
> --get-colorbool <name> [<stdout-is-tty>]::
>
> Find the color setting for `<name>` (e.g. `color.diff`) and output
As to the name, I tend to agree that --show-names is a strange name
for the option, and I would have even suggest making "--all" to show
the name by default and give "--hide-name" option to countermand it
if we were adding this topic afresh today. But that unfortunately
is all too late to change without much more effort than just changing
the name.
next prev parent reply other threads:[~2024-08-19 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 0:45 [PATCH] doc: add --show-names for git config Yukai Chou
2024-08-19 0:59 ` Yukai Chou
2024-08-19 16:04 ` Junio C Hamano [this message]
2024-08-19 18:27 ` [PATCH v2] " Yukai Chou
2024-08-19 19:22 ` Junio C Hamano
2024-08-21 6:53 ` Patrick Steinhardt
2024-08-21 16:01 ` Junio C Hamano
2024-08-21 6:53 ` [PATCH] " Patrick Steinhardt
2024-08-21 16:02 ` 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=xmqqcym4fqhp.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=muzimuzhi@gmail.com \
/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).