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

4 messages from 2017-10-03 to 2017-10-03. Participants: rpjday@crashcourse.ca, Jeff King, Robert P. J. Day.
Thread: https://gitlist.dev/t/46888

## rpjday@crashcourse.ca, 2017-10-03 10:34

Subject: "man git-config", "--list" option misleadingly refers to "config file" (singular)
Message-ID: <20171003063434.Horde.nbQwMWrv0wS_naxhawU5YlG@crashcourse.ca>
URL: https://gitlist.dev/e/20171003063434.Horde.nbQwMWrv0wS_naxhawU5YlG%40crashcourse.ca

```

   (i suppose that if i'm going to continue whining about stuff, i might
as well clone the git source and start submitting patches.)

   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?

   i can submit a patch to clarify that, unless there's some weird definition
of "config file" that implicitly means the combination of all of them.

rday


```

## Jeff King, 2017-10-03 13:49

Subject: Re: "man git-config", "--list" option misleadingly refers to "config file" (singular)
Message-ID: <20171003134954.cptlpaipmiulfgug@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20171003134954.cptlpaipmiulfgug%40sigill.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. :)

>   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

```

## Robert P. J. Day, 2017-10-03 20:54

Subject: Re: "man git-config", "--list" option misleadingly refers to "config file" (singular)
Message-ID: <alpine.LFD.2.21.1710031653360.8461@localhost.localdomain>
URL: https://gitlist.dev/e/alpine.LFD.2.21.1710031653360.8461%40localhost.localdomain
In-Reply-To: <20171003134954.cptlpaipmiulfgug@sigill.intra.peff.net>

```
On Tue, 3 Oct 2017, Jeff King wrote:

> 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. :)
>
> >   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?

  i think the simplest phrasing is, "List all variables set in the
current configuration, along with their values."

  sound fair?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

```

## Jeff King, 2017-10-03 23:12

Subject: Re: "man git-config", "--list" option misleadingly refers to "config file" (singular)
Message-ID: <20171003231242.oem4equq6cvicxcw@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20171003231242.oem4equq6cvicxcw%40sigill.intra.peff.net
In-Reply-To: <alpine.LFD.2.21.1710031653360.8461@localhost.localdomain>

```
On Tue, Oct 03, 2017 at 04:54:32PM -0400, Robert P. J. Day wrote:

> > 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?
> 
>   i think the simplest phrasing is, "List all variables set in the
> current configuration, along with their values."
> 
>   sound fair?

Yes, sounds reasonable to me.

-Peff

```
