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
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
Previous: Sebastian SchuberthNext: Jeff King
Message 4 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.