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

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

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Apr 14, 2013, 19:05 UTC
Message-ID
<CAHGBnuOJFVahoUwcF6dZZUEmDtKU_zvWsKtTwufN7RqeNxkZ=w@mail.gmail.com>
In-Reply-To
<20130414185619.GB1621@sigill.intra.peff.net>
On Sun, Apr 14, 2013 at 8:56 PM, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
>> 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 flag that returns the config if it is set or
>> the default otherwise. Something like git config --value perhaps.
>
> The expected output is certainly a problem, but the issue is more
> fundamental than that: git-config does not even _know_ what the default
> is for any given option.

Thanks for the explanation, I feared something like that. I.e. that git config does not even know any of the options or values it manages, but just is a "dumb" front-end to writing / reading whatever you pass it to / from a file.

-- 
Sebastian Schuberth
Previous: Jeff KingNext: Jakub Narębski
Message 6 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.