From: Yukai Chou <muzimuzhi@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, ps@pks.im
Subject: Re: builtin/config: --name-only doesn't imply --show-names in "git config get"
Date: Thu, 22 Aug 2024 04:28:34 +0800 [thread overview]
Message-ID: <CAEg0tHQVK9hgcHTzn-ZPdwoFbbYFB2joeT0jLQgtD6yEH+1GiA@mail.gmail.com> (raw)
In-Reply-To: <xmqqttfd2734.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2024年8月22日周四 00:07写道:
>
> Yukai Chou <muzimuzhi@gmail.com> writes:
>
> > # get empty line(s)
> > git config get --all --name-only remote.origin.fetch
> > # get lines of name(s)
> > git config get --all --show-names --name-only remote.origin.fetch
> >
> > Either the doc or the behavior of --name-only needs some adjustment.
>
> This argues for making "all" imply we need to show the name of the
> configuration variable,
Sorry can you elaborate on what that "all" meant? A new option "--show-all"?
> and introducing an option "--hide-name" to
> omit the name. That way, you'd need to give clearly contradicting
> "--hide-name" and "--name-only" together to get a nonsense output.
I have a feeling that finally a collection of options shared by "git
config list" and "git config get" will be introduced to fully control
what they output, and even make the form of output given by one of
"git config list" and "git config get" look exactly like the other.
An ideal design:
--show-all
--[no-]show-scope
--[no-]show-origin
--[no-]show-name
--[no-]show-value
--hide-all
--separator=<sep> # fuzzy name?
Initial options
- git config list: --hide-all --show-name --show-value --separator="="
- git config get: --hide-all --show-value --separator=" "
The drawback is, quite some combinations of such options are nonsense.
Yukai
next prev parent reply other threads:[~2024-08-21 20:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 8:10 builtin/config: --name-only doesn't imply --show-names in "git config get" Yukai Chou
2024-08-21 16:06 ` Junio C Hamano
2024-08-21 20:28 ` Yukai Chou [this message]
2024-08-21 20:59 ` Junio C Hamano
2024-08-22 5:57 ` Patrick Steinhardt
2024-08-22 14:54 ` 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=CAEg0tHQVK9hgcHTzn-ZPdwoFbbYFB2joeT0jLQgtD6yEH+1GiA@mail.gmail.com \
--to=muzimuzhi@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/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).