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

Re: Q: rational for $XDG_CONFIG_HOME/git/config to be "non global" or just a bug?

From
Jacob Keller <jacob.keller@gmail.com>
Date
Dec 13, 2017, 05:35 UTC
Message-ID
<CA+P7+xqsKDqZK=7vaLqFeuqXjSrTgqupWnNA4WrxN8J9Td7N7A@mail.gmail.com>
In-Reply-To
<20171212141355.7hcuegaopb6hee2l@hopa.kiewit.dartmouth.edu>
On Tue, Dec 12, 2017 at 6:13 AM, Yaroslav Halchenko <yoh@onerussian.com> wrote:
Show 50 quoted lines
>
> On Mon, 11 Dec 2017, Junio C Hamano wrote:
>
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> > I think the documentation
>
>> >     ~/.gitconfig
>> >             User-specific configuration file. Also called "global"
>> >             configuration file.
>
>> > should be clarified --- e.g. it could say
>
>> >     $XDG_CONFIG_HOME/git/config
>> >     ~/.gitconfig
>> >             User-specific configuration files. Because options in
>> >             these files are not specific to any repository, thes
>> >             are sometimes called global configuration files.
>
>> Yeah, I think that makes sense.
>
>> > As for "git config --global", I think the best thing would be to split
>> > it into two options: something like "git config --user" and "git
>> > config --xdg-user".  That way, it is unambiguous which configuration
>> > file the user intends to inspect or modify.  When a user calls "git
>> > config --global" and both files exist, it could warn that the command
>> > is ambiguous.
>
>> > Thoughts?
>
>> I actually thought that the plan was "you either have this, or the
>> other one, never both at the same time" (and I think those who
>> pushed the XDG thing in to the system made us favor it over the
>> traditional one).  So as long as --global updates the one that
>> exists, and updates XDG one when both or neither do, I think we
>> should be OK.  And from that viewpoint, we definitely do not want
>> two kinds of --global to pretend as if we support use of both at the
>> same time.
>
> note that atm $XDG_CONFIG_HOME/git/config is read as --global iff
> ~/.gitconfig is absent and read always without --global.  So it is
> flipping between "global" and "some kind of non-global but user-specific
> configuration file" (so sounds like  a global to me ;) )
>
> --
> Yaroslav O. Halchenko
> Center for Open Neuroscience     http://centerforopenneuroscience.org
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik

I didn't see it read, if ~/.gitconfig exists, it appears to never be read on my system..

Thanks, Jake

Previous: Yaroslav HalchenkoNext: brian m. carlson
Message 9 of 15 in “Q: rational for $XDG_CONFIG_HOME/git/config to be "non global" or just a bug?”
  1. Yaroslav HalchenkoDec 11, 2017
  2. Jonathan NiederDec 11, 2017
  3. Yaroslav HalchenkoDec 12, 2017
  4. Junio C HamanoDec 12, 2017
  5. Jacob KellerDec 12, 2017
  6. Junio C HamanoDec 12, 2017
  7. Jacob KellerDec 13, 2017
  8. Yaroslav HalchenkoDec 12, 2017
  9. Jacob KellerDec 13, 2017
  10. brian m. carlsonDec 16, 2017
  11. Jacob KellerDec 18, 2017
  12. Jeff KingDec 18, 2017
  13. Yaroslav HalchenkoDec 18, 2017
  14. Junio C HamanoDec 18, 2017
  15. Jacob KellerDec 18, 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.