Re: BUG: git config --global --get ITEM ignores ~/.config/git/config when ~/.gitconfig is present

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Jade Lovelace <lists@xxxxxxxx> writes:
>
>> Then:
>>
>>  » git config --global --get user.name
>>  » git config --show-scope --show-origin --get user.name
>> global  file:/home/jade/.config/git/config      Jade Lovelace
>
> With "--get" replaced with "--get-all", what do you see?

Ah, nevermind.  With "--global", we seem to read from only one,
giving the ~/.gitconfig precedence over $XDG/git/config, even though
without "--global", we will read from both.

The code has been behaving like so since its inception at 21cf3227
(config: read (but not write) from $XDG_CONFIG_HOME/git/config file,
2012-06-22).  I am not sure if this was designed to behave like so
for a reason (which unfortunately is not clear in the log message of
the commit), or a bug that was caused by the authors who were too
focused on the writing side of the equation (which must pick just
one file to write to).

My gut feeling is that this is merely a bug that we can fix without
worrying too much about users screaming at us complaining that they
relied on the current behaviour.  Without --global we do read from
both, so with with "--global" the behaviour is inconsistent.

Thanks for a report.



[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