Re: git makes it impossible to ignore or override global gitconfig, needs `GITCONFIGFILE`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 19, 2020 at 07:28:58PM -0700, Timothee Cour wrote:

> * require passing commands (eg `git -c`) is not good either; it'd
> require updating scripts that rely on git (this could be arbitrarily
> complex, sometimes impossible if you just have a binary and no source
> code access)

Well, yes, that's why I suggested setting $GIT_CONFIG_PARAMETERS
directly. :)

That said, I don't have any real opposition to an environment variable
to override the user-level config location, if somebody wants to work up
a patch. A few preliminary thoughts:

 - there are several levels of config file, so it probably should be
   called GIT_GLOBAL_CONFIG or something to make it clear that it
   matches "config --global" (and not system or repo-level config)

 - we'll read user-level config from multiple sources currently:
   ~/.gitconfig and the xdg config dir. Presumably this would override
   them rather than add to them to be of any use.

 - I wondered for a moment if such a variable would need to be added to
   local_repo_env[] to get cleared when moving between repos. But as a
   user-level thing, it should be outside that.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux