{"thread":{"id":"61969","subject":"[PATCH] doc: add --show-names for git config","startedAt":"2024-08-19T00:45:16Z","lastAt":"2024-08-21T16:02:46Z","messageCount":9,"participants":["Yukai Chou","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"501242","messageId":"CAEg0tHRL9+tqY0k2GiGzhc-VgMVsHqppLRFHbc=M33R6AoLXEg@mail.gmail.com","threadId":"61969","inReplyTo":null,"subject":"[PATCH] doc: add --show-names for git config","fromName":"Yukai Chou","fromEmail":"muzimuzhi@gmail.com","sentAt":"2024-08-19T00:45:02Z","receivedAt":"2024-08-19T00:45:16Z","isPatch":true,"sender":{"key":"muzimuzhi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6376638?v=4"},"body":"Option \"--show-names\" was introduced along with the \"get\" subcommand\nof git-config(1) [1]. It was used in Deprecated Modes doc examples,\nnormal and completion tests, but not documented.\n\nIt's known by both \"get\" and \"list\", though has no effect on \"list\".\n\nSigned-off-by: Yukai Chou <muzimuzhi@gmail.com>\n---\n Documentation/git-config.txt | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 65c645d461..525c29fcff 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -268,6 +268,10 @@ Valid `<type>`'s include:\n  all queried config options with the scope of that value\n  (worktree, local, global, system, command).\n\n+--show-names::\n+ Output also the names of config variables for `list` or\n+ `get`.\n+\n --get-colorbool <name> [<stdout-is-tty>]::\n\n  Find the color setting for `<name>` (e.g. `color.diff`) and output\n-- \n2.46.0\n"},{"id":"501243","messageId":"CAEg0tHRave5gCWeFuTFeZiR0U=R-bnW6tYGXJp9GQP=oVh5gRg@mail.gmail.com","threadId":"61969","inReplyTo":"CAEg0tHRL9+tqY0k2GiGzhc-VgMVsHqppLRFHbc=M33R6AoLXEg@mail.gmail.com","subject":"Re: [PATCH] doc: add --show-names for git config","fromName":"Yukai Chou","fromEmail":"muzimuzhi@gmail.com","sentAt":"2024-08-19T00:59:33Z","receivedAt":"2024-08-19T00:59:47Z","isPatch":true,"sender":{"key":"muzimuzhi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6376638?v=4"},"body":"> +--show-names::\n> + Output also the names of config variables for `list` or\n> + `get`.\n> +\n\nA bit of inconsistency: both singular (`--name-only` [1]) and\nplural (`--show-names`) forms are used in similar git-config(1)\noptions.\n\nAs both `--show-origin` and `--show-scope` use the singular forms,\nperhaps `--show-names` can be renamed to `--show-name` too?\n\n[1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt---name-only\n"},{"id":"501285","messageId":"xmqqcym4fqhp.fsf@gitster.g","threadId":"61969","inReplyTo":"CAEg0tHRL9+tqY0k2GiGzhc-VgMVsHqppLRFHbc=M33R6AoLXEg@mail.gmail.com","subject":"Re: [PATCH] doc: add --show-names for git config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-08-19T16:04:50Z","receivedAt":"2024-08-19T16:04:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yukai Chou <muzimuzhi@gmail.com> writes:\n\n> Option \"--show-names\" was introduced along with the \"get\" subcommand\n> of git-config(1) [1]. It was used in Deprecated Modes doc examples,\n\nThere is no [1].\n\n> normal and completion tests, but not documented.\n>\n> It's known by both \"get\" and \"list\", though has no effect on \"list\".\n>\n> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>\n> ---\n\nI'd probably write it more like so\n\n    4e513890 (builtin/config: introduce \"get\" subcommand,\n    2024-05-06) introduced \"--show-names\" option that is used to\n    give the name of the configuraiton variable to each output entry\n    in addition to the value.  It however forgot to document it,\n    even though the option is used in a few examples.\n\n    Document it.\n\nif I were doing this commit.\n\n> +--show-names::\n> + Output also the names of config variables for `list` or\n> + `get`.\n\nConsidering how long the later \"Find the color setting\" line is, I\nthink it is better to write that on a single line, i.e.\n\n> + Output also the names of config variables for `list` or `get`.\n\nIt fills only 66-column counting the quote \"> \" and diff formatting\n\"+\".\n\n> +\n>  --get-colorbool <name> [<stdout-is-tty>]::\n>\n>   Find the color setting for `<name>` (e.g. `color.diff`) and output\n\nAs to the name, I tend to agree that --show-names is a strange name\nfor the option, and I would have even suggest making \"--all\" to show\nthe name by default and give \"--hide-name\" option to countermand it\nif we were adding this topic afresh today.  But that unfortunately\nis all too late to change without much more effort than just changing\nthe name.\n\n\n\n"},{"id":"501296","messageId":"CAEg0tHQDT7LesB2kiQD4rXwcUs5ZhOH+YWdn990tfGdrnYdgZg@mail.gmail.com","threadId":"61969","inReplyTo":"xmqqcym4fqhp.fsf@gitster.g","subject":"[PATCH v2] doc: add --show-names for git config","fromName":"Yukai Chou","fromEmail":"muzimuzhi@gmail.com","sentAt":"2024-08-19T18:27:56Z","receivedAt":"2024-08-19T18:28:09Z","isPatch":true,"sender":{"key":"muzimuzhi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6376638?v=4"},"body":"4e513890 (builtin/config: introduce \"get\" subcommand,\n2024-05-06) introduced \"--show-names\" option that is used to\ngive the name of the configuration variable to each output entry\nin addition to the value.  It however forgot to document it,\neven though the option is used in a few examples.\n\nDocument it.\n\nSigned-off-by: Yukai Chou <muzimuzhi@gmail.com>\n---\nThanks for your review and suggestions Junio. I must have stayed up\ntoo late yesterday, so what the commit message was sent was not the\nfinal version.\n\n Documentation/git-config.txt | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 65c645d461..16323c4ed0 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -268,6 +268,9 @@ Valid `<type>`'s include:\n  all queried config options with the scope of that value\n  (worktree, local, global, system, command).\n\n+--show-names::\n+ Output also the names of config variables for `list` or `get`.\n+\n --get-colorbool <name> [<stdout-is-tty>]::\n\n  Find the color setting for `<name>` (e.g. `color.diff`) and output\n-- \n2.46.0\n"},{"id":"501298","messageId":"xmqqle0se2ra.fsf@gitster.g","threadId":"61969","inReplyTo":"CAEg0tHQDT7LesB2kiQD4rXwcUs5ZhOH+YWdn990tfGdrnYdgZg@mail.gmail.com","subject":"Re: [PATCH v2] doc: add --show-names for git config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-08-19T19:22:49Z","receivedAt":"2024-08-19T19:22:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[Cc-ing the author of 4e513890 that was referred to by this change.]\n\nYukai Chou <muzimuzhi@gmail.com> writes:\n\n> 4e513890 (builtin/config: introduce \"get\" subcommand,\n> 2024-05-06) introduced \"--show-names\" option that is used to\n> give the name of the configuration variable to each output entry\n> in addition to the value.  It however forgot to document it,\n> even though the option is used in a few examples.\n>\n> Document it.\n>\n> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>\n> ---\n> Thanks for your review and suggestions Junio. I must have stayed up\n> too late yesterday, so what the commit message was sent was not the\n> final version.\n>\n>  Documentation/git-config.txt | 3 +++\n>  1 file changed, 3 insertions(+)\n>\n> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\n> index 65c645d461..16323c4ed0 100644\n> --- a/Documentation/git-config.txt\n> +++ b/Documentation/git-config.txt\n> @@ -268,6 +268,9 @@ Valid `<type>`'s include:\n>   all queried config options with the scope of that value\n>   (worktree, local, global, system, command).\n>\n> +--show-names::\n> + Output also the names of config variables for `list` or `get`.\n> +\n>  --get-colorbool <name> [<stdout-is-tty>]::\n>\n>   Find the color setting for `<name>` (e.g. `color.diff`) and output\n"},{"id":"501402","messageId":"ZsWO-K4UFXsG7QNY@tanuki","threadId":"61969","inReplyTo":"CAEg0tHQDT7LesB2kiQD4rXwcUs5ZhOH+YWdn990tfGdrnYdgZg@mail.gmail.com","subject":"Re: [PATCH v2] doc: add --show-names for git config","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-08-21T06:53:52Z","receivedAt":"2024-08-21T06:53:58Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Aug 20, 2024 at 02:27:56AM +0800, Yukai Chou wrote:\n> 4e513890 (builtin/config: introduce \"get\" subcommand,\n> 2024-05-06) introduced \"--show-names\" option that is used to\n> give the name of the configuration variable to each output entry\n> in addition to the value.  It however forgot to document it,\n> even though the option is used in a few examples.\n> \n> Document it.\n> \n> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>\n> ---\n> Thanks for your review and suggestions Junio. I must have stayed up\n> too late yesterday, so what the commit message was sent was not the\n> final version.\n> \n>  Documentation/git-config.txt | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\n> index 65c645d461..16323c4ed0 100644\n> --- a/Documentation/git-config.txt\n> +++ b/Documentation/git-config.txt\n> @@ -268,6 +268,9 @@ Valid `<type>`'s include:\n>   all queried config options with the scope of that value\n>   (worktree, local, global, system, command).\n> \n> +--show-names::\n> + Output also the names of config variables for `list` or `get`.\n> +\n\nThis looks sensible. I'd probably drop the \"also\" here, which reads a\nbit awkward. Do we also want to spell out how names and values are\nseparated from each other?\n\nPatrick\n"},{"id":"501403","messageId":"ZsWPBCW-pI4qIykK@tanuki","threadId":"61969","inReplyTo":"xmqqcym4fqhp.fsf@gitster.g","subject":"Re: [PATCH] doc: add --show-names for git config","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-08-21T06:53:56Z","receivedAt":"2024-08-21T06:54:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Aug 19, 2024 at 09:04:50AM -0700, Junio C Hamano wrote:\n> As to the name, I tend to agree that --show-names is a strange name\n> for the option, and I would have even suggest making \"--all\" to show\n> the name by default and give \"--hide-name\" option to countermand it\n> if we were adding this topic afresh today.  But that unfortunately\n> is all too late to change without much more effort than just changing\n> the name.\n\nMh. Yeah, that might've been the better default indeed. The new command\nis still relatively young, but still, I don't know whether changing this\nis in the picture now.\n\nPatrick\n"},{"id":"501438","messageId":"xmqq34mx3lwa.fsf@gitster.g","threadId":"61969","inReplyTo":"ZsWO-K4UFXsG7QNY@tanuki","subject":"Re: [PATCH v2] doc: add --show-names for git config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-08-21T16:01:41Z","receivedAt":"2024-08-21T16:01:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>> +--show-names::\n>> + Output also the names of config variables for `list` or `get`.\n>> +\n>\n> This looks sensible. I'd probably drop the \"also\" here, which reads a\n> bit awkward. Do we also want to spell out how names and values are\n> separated from each other?\n\nSounds like a good thing to add.  Thanks.\n"},{"id":"501439","messageId":"xmqqy14p27a3.fsf@gitster.g","threadId":"61969","inReplyTo":"ZsWPBCW-pI4qIykK@tanuki","subject":"Re: [PATCH] doc: add --show-names for git config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-08-21T16:02:44Z","receivedAt":"2024-08-21T16:02:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Mon, Aug 19, 2024 at 09:04:50AM -0700, Junio C Hamano wrote:\n>> As to the name, I tend to agree that --show-names is a strange name\n>> for the option, and I would have even suggest making \"--all\" to show\n>> the name by default and give \"--hide-name\" option to countermand it\n>> if we were adding this topic afresh today.  But that unfortunately\n>> is all too late to change without much more effort than just changing\n>> the name.\n>\n> Mh. Yeah, that might've been the better default indeed. The new command\n> is still relatively young, but still, I don't know whether changing this\n> is in the picture now.\n\nYeah, it appeared only in the latest release, and may not be relied\non yet.\n"}]}