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

Re: "man git-config", "--list" option misleadingly refers to "config file" (singular)

From
Jeff King <peff@peff.net>
Date
Oct 3, 2017, 13:49 UTC
Message-ID
<20171003134954.cptlpaipmiulfgug@sigill.intra.peff.net>
In-Reply-To
<20171003063434.Horde.nbQwMWrv0wS_naxhawU5YlG@crashcourse.ca>
On Tue, Oct 03, 2017 at 06:34:34AM -0400, rpjday@crashcourse.ca wrote:
>   (i suppose that if i'm going to continue whining about stuff, i might
> as well clone the git source and start submitting patches.)
Yes, please. :)
Show 12 quoted lines
>   in "man git-config":
> 
>     -l
>     --list
>           List all variables set in config file, along with their values.
>                                            ^^^^
> 
> except that, AIUI, "git config --list" will list the combination of all
> config values in (if it exists) /etc/gitconfig, then the user's global
> settings, and finally the repo's config settings if one happens to be
> in a working directory, so technically, it lists the contents of *all* of
> the config files (plural), no?

It does that by default, or it lists the contents of a specific file if given (either by --file, or with --system, --global, or --local).

So I agree it's not quite accurate, but you probably want some phrasing that leaves this unsaid (the actual rules are described earlier in the description section). Maybe just refer to it as the "config source" or something?

-Peff
Previous: rpjday@crashcourse.caNext: Robert P. J. Day
Message 2 of 4 in “"man git-config", "--list" option misleadingly refers to "config file" (singular)”
  1. rpjday@crashcourse.caOct 3, 2017
  2. Jeff KingOct 3, 2017
  3. Robert P. J. DayOct 3, 2017
  4. Jeff KingOct 3, 2017

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.