From: Junio C Hamano Date: Thu, 02 Oct 2014 17:51:05 GMT Subject: Re: $GIT_CONFIG should either apply to all commands, or none at all Message-ID: In-Reply-To: <20141002011546.GR1175@google.com> Jonathan Nieder writes: > Yep. One possibility would be to do something like the following (A): > > 1) advertise in the git-config(1) manpage that the GIT_CONFIG > environment variable only affects the behavior of the 'git config' > command > > 2) introduce an environment variable GIT_I_AM_PORCELAIN. (If doing > this, we could come up with a better name, but this is just an > illustration.) Set and export that envvar in git-sh-setup.sh. > When that environment variable is set, make git-config stop paying > attention to GIT_CONFIG. > > That way, git commands that happen to be scripts would not be > affected by the GIT_CONFIG setting any more. At the places you plan to update porcelains to set and export GIT_I_AM_PORCELAIN, you could unset GIT_CONFIG if set. Would that achieve the same goal? And you can stop there without doing 3 or 4, no?