Re: Why does "git config" output nothing instead of the default value for unset variables?
- From
Andrew Ardill <andrew.ardill@gmail.com>
- Date
- Apr 14, 2013, 13:03 UTC
- Message-ID
- <CAH5451=GsvVLX+08agpWgggTdYsgpD8H-JHxGOgThC=D=GObhw@mail.gmail.com>
- In-Reply-To
- <CAHGBnuO2d9Wkez4sLLKp3Ei0vkAJBjJp1+m+Lsu3ozaKPQD29A@mail.gmail.com>
On 14 April 2013 22:56, Sebastian Schuberth <sschuberth@gmail.com> wrote:
Show 5 quoted lines
>> The closest thing I can see for doing this is git config --list, but >> perhaps there should be a flag to check if a config item is set? > > Yet more command line options? Well, there's probably no way around > that in order to maintain backward compatibility.
'--list' already exists; it shows all defined options. With your change in place (and no others) then the only (documented) way to know if something was configured would be by looking at git config --list.
Changing the default behaviour is probably too big a breaking change, but a flag to change the behaviour might be nice. Then again, there may be away to do what you want already :-)
Regards,
Andrew Ardill