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]

 



The v2.46.0 doc of git-config(1) says

> --name-only
> Output only the names of config variables for `list` or `get`.
https://git-scm.com/docs/git-config#Documentation/git-config.txt---name-only

But the behavior of --name-only is more like "disable non-name outputs
and leave the output state of names as-is". Thus using --name-only
alone, one gets totally empty lines (which might be weird); only using
--name-only and --show-names together, can one get output of just
names.

# 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.

Yukai Chou




[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