Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

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

From: Jakub Narębski <hidden>
Date: 2016-06-15 22:56:49

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 to some value or not, but what
value is currently in use. With that in mind, it would make much more
sense for git config to print the implicit default value instead of
nothing if a known variable is unset. For unknown / custom variables it
still could display nothing, which also gives a nice way to check
whether a given variable name is known to Git or not.
I think git-config was meant to be git agnostic (and therefore usable
outside git, and for files other that git config files).

It would be better to add required functionality to git-var, IMHO.

-- 
Jakub Narębski
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help