From: Yukai Chou Date: Wed, 21 Aug 2024 20:28:34 GMT Subject: Re: builtin/config: --name-only doesn't imply --show-names in "git config get" Message-ID: In-Reply-To: Junio C Hamano 于2024年8月22日周四 00:07写道: > > Yukai Chou 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= # 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