Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 30, 2008, 00:41 UTC
- Message-ID
- <alpine.DEB.1.00.0806300134200.9925@racer>
- In-Reply-To
- <alpine.LNX.1.00.0806291821520.19665@iabervon.org>
Hi,
On Sun, 29 Jun 2008, Daniel Barkalow wrote:
Show 16 quoted lines
> On Sun, 29 Jun 2008, Johannes Schindelin wrote: > > > On Sun, 29 Jun 2008, Daniel Barkalow wrote: > > > > > Did we even make a commitment on whether: > > > > > > GIT_CONFIG=foo git clone bar > > > > > > must ignore the environment variable, or simply doesn't necessarily > > > obey it? > > > > I'd rather strongly argue that no matter what is the answer to this > > question, we _HAVE TO_ unsetenv() GIT_CONFIG at some stage, otherwise > > no .git/config will be written. > > Why should .git/config get written?
Because the user asked for a clone, where she reasonably expects a git repository with all the [core] and the initial [remote "origin"] settings to be written as it should be, _even if_ setting the config to somewhere else? Hmm?
IMITCNVHO it would be a serious mistake to write the config somewhere else with "clone".
If that still does not convince you, "git init" also writes to ".git/config" regardless of the user's (possibly bogus) GIT_CONFIG.
It is just such a basic thing that you must _not_ use GIT_CONFIG for writing with git clone or git init.
Ciao, Dscho