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

Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2012, 17:50 UTC
Message-ID
<7vk3vfqrrp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpq626zjtds.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 20 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
>> index eaea079..c8db03f 100644
>> --- a/Documentation/git-config.txt
>> +++ b/Documentation/git-config.txt
>> @@ -205,6 +205,9 @@ $GIT_DIR/config::
>>  	User-specific configuration file. Also called "global"
>>  	configuration file.
>>  
>> +$GIT_GLOBAL_CONFIG::
>> +	Overrides the path of the global configuration file.
>> +
>
> I'm not particularly in favor of introducing another environment
> variable, but if you are to introduce it, why just override the
> configuration file, and not $HOME completely (e.g. to override
> $HOME/.git-credentials too).
>
> There was a patch proposing that here ($GIT_HOME to override $HOME):

I think both of these are at the entrance of slippery slope to insanity I'd rather not to venture into.

If somebody hates ~/.dotmanyfiles so much, why not do HOME=~/dots/, instead of having to set GIT_HOME to move ~/.gitconfig, FROTZ_HOME to move ~/.frotzconfig, MAIL_HOME to move ~/.mailrc, etc.?

I wouldn't be surprised if some _other_ things break with your HOME pointing at a directory inside your home directory, but then it may be better to fix that other thing instead.

Previous: Matthieu MoyNext: Junio C Hamano
Message 6 of 14 in “Configuring the location of ~/.gitconfig”
  1. Ramkumar RamachandraSep 26, 2012
  2. David AguilarSep 26, 2012
  3. Ramkumar RamachandraSep 27, 2012
  4. config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfigRamkumar Ramachandra, Sep 27, 2012
  5. Matthieu MoySep 27, 2012
  6. Junio C HamanoSep 27, 2012
  7. Junio C HamanoSep 27, 2012
  8. Jeff KingSep 27, 2012
  9. Junio C HamanoSep 27, 2012
  10. Matthieu MoySep 27, 2012
  11. Ramkumar RamachandraSep 28, 2012
  12. Junio C HamanoSep 27, 2012
  13. Anurag PriyamSep 27, 2012
  14. Junio C HamanoSep 27, 2012

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.