git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Apr 14, 2013, 12:34 UTC
Message-ID
<kke7o1$oo$1@ger.gmane.org>
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.

-- 
Sebastian Schuberth
Next: Andrew Ardill
Message 1 of 7 in “Why does "git config" output nothing instead of the default value for unset variables?”
  1. Sebastian SchuberthApr 14, 2013
  2. Andrew ArdillApr 14, 2013
  3. Sebastian SchuberthApr 14, 2013
  4. Andrew ArdillApr 14, 2013
  5. Jeff KingApr 14, 2013
  6. Sebastian SchuberthApr 14, 2013
  7. Jakub NarębskiApr 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.