Re: builtin/config: --name-only doesn't imply --show-names in "git config get"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> 于2024年8月22日周四 00:07写道:
>
> Yukai Chou <muzimuzhi@xxxxxxxxx> 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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux