diff mbox series

[v2] doc: add --show-names for git config

Message ID CAEg0tHQDT7LesB2kiQD4rXwcUs5ZhOH+YWdn990tfGdrnYdgZg@mail.gmail.com (mailing list archive)
State New
Headers show
Series [v2] doc: add --show-names for git config | expand

Commit Message

Yukai Chou Aug. 19, 2024, 6:27 p.m. UTC
4e513890 (builtin/config: introduce "get" subcommand,
2024-05-06) introduced "--show-names" option that is used to
give the name of the configuration 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.

Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>
---
Thanks for your review and suggestions Junio. I must have stayed up
too late yesterday, so what the commit message was sent was not the
final version.

 Documentation/git-config.txt | 3 +++
 1 file changed, 3 insertions(+)

Comments

Junio C Hamano Aug. 19, 2024, 7:22 p.m. UTC | #1
[Cc-ing the author of 4e513890 that was referred to by this change.]

Yukai Chou <muzimuzhi@gmail.com> writes:

> 4e513890 (builtin/config: introduce "get" subcommand,
> 2024-05-06) introduced "--show-names" option that is used to
> give the name of the configuration 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.
>
> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>
> ---
> Thanks for your review and suggestions Junio. I must have stayed up
> too late yesterday, so what the commit message was sent was not the
> final version.
>
>  Documentation/git-config.txt | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 65c645d461..16323c4ed0 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -268,6 +268,9 @@ Valid `<type>`'s include:
>   all queried config options with the scope of that value
>   (worktree, local, global, system, command).
>
> +--show-names::
> + Output also the names of config variables for `list` or `get`.
> +
>  --get-colorbool <name> [<stdout-is-tty>]::
>
>   Find the color setting for `<name>` (e.g. `color.diff`) and output
Patrick Steinhardt Aug. 21, 2024, 6:53 a.m. UTC | #2
On Tue, Aug 20, 2024 at 02:27:56AM +0800, Yukai Chou wrote:
> 4e513890 (builtin/config: introduce "get" subcommand,
> 2024-05-06) introduced "--show-names" option that is used to
> give the name of the configuration 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.
> 
> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>
> ---
> Thanks for your review and suggestions Junio. I must have stayed up
> too late yesterday, so what the commit message was sent was not the
> final version.
> 
>  Documentation/git-config.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 65c645d461..16323c4ed0 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -268,6 +268,9 @@ Valid `<type>`'s include:
>   all queried config options with the scope of that value
>   (worktree, local, global, system, command).
> 
> +--show-names::
> + Output also the names of config variables for `list` or `get`.
> +

This looks sensible. I'd probably drop the "also" here, which reads a
bit awkward. Do we also want to spell out how names and values are
separated from each other?

Patrick
Junio C Hamano Aug. 21, 2024, 4:01 p.m. UTC | #3
Patrick Steinhardt <ps@pks.im> writes:

>> +--show-names::
>> + Output also the names of config variables for `list` or `get`.
>> +
>
> This looks sensible. I'd probably drop the "also" here, which reads a
> bit awkward. Do we also want to spell out how names and values are
> separated from each other?

Sounds like a good thing to add.  Thanks.
diff mbox series

Patch

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 65c645d461..16323c4ed0 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -268,6 +268,9 @@  Valid `<type>`'s include:
  all queried config options with the scope of that value
  (worktree, local, global, system, command).

+--show-names::
+ Output also the names of config variables for `list` or `get`.
+
 --get-colorbool <name> [<stdout-is-tty>]::

  Find the color setting for `<name>` (e.g. `color.diff`) and output