Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
On Sun, Apr 14, 2013 at 8:56 PM, Jeff King wrote: >> More to the point, I can easily imagine many scripts relying on git >> config returning a value to indicate that a config item has been set. >> Your proposed change would break all those. For that reason, it might >> be nicer to introduce a fla

Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 10:47:31PM +1000, Andrew Ardill wrote: > More to the point, I can easily imagine many scripts relying on git > config returning a value to indicate that a config item has been set. > Your proposed change would break all those. For that reason, it might > be nicer to introdu

Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Jakub Narębski
Sebastian Schuberth wrote: > Hi, > > I'm just wondering why it was decided to work like this. IMHO it's quite > inconvenient that git config outputs nothing for any unset (but known) > variable. Usually when I query a variable I'm not so much interested in > whether it is at all (explicitly) set t

Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Andrew Ardill
On 14 April 2013 22:56, Sebastian Schuberth wrote: >> 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 backwar

Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
On Sun, Apr 14, 2013 at 2:47 PM, Andrew Ardill wrote: > On 14 April 2013 22:34, Sebastian Schuberth wrote: >> Usually when I query a variable I'm not so much interested in whether it is >> at all (explicitly) set to some value or not, but what value is currently in >> use. > > With your change

Re: Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Andrew Ardill
On 14 April 2013 22:34, Sebastian Schuberth wrote: > Usually when I query a variable I'm not so much interested in whether it is > at all (explicitly) set to some value or not, but what value is currently in > use. With your change in place, how do you know if the config item has been explicitl

Why does "git config" output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
Hi, I'm just wondering why it was decided to work like this. IMHO it's quite inconvenient that git config outputs nothing for any unset (but known) variable. Usually when I query a variable I'm not so much interested in whether it is at all (explicitly) set to some value or not, but what valu