Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Barkalow
Date: Sunday, June 29, 2008 - 6:54 pm

On Mon, 30 Jun 2008, Johannes Schindelin wrote:


But those should be written to the location of the config file, where 
subsequent commands will find them, which is $GIT_CONFIG if it's set and 
git commands in general use it. I mean:

$ export GIT_CONFIG=/home/barkalow/something
$ git clone git://git.kernel.org/pub/scm/git/git.git
$ cd git
$ git fetch
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

(because "git clone" currently ignores GIT_CONFIG, but "git fetch" 
doesn't, so it can't find the initial [remote "origin"] settings).


No, "git init" has always written to GIT_CONFIG. In fact, git-clone.sh 
used to depend on it writing to GIT_CONFIG, which is how it caused the 
config file to be written into the new clone.


Surely, then, you must not use GIT_CONFIG when reading the options that 
git clone writes? But I think this reduces to "you must not use GIT_CONFIG 
when using a repository", which pretty much leaves "git config". And I 
think it's only ever *useful* for "git config" anyway.

It doesn't make much sense to ensure that "git clone" works if you have 
GIT_CONFIG set when nothing else works in that situation. I still don't 
know what setting it is good for (and the commit that introduced it 
explained what it did, but not why), but I think we should be consistant 
about whether or not it affects where git expects configuration to be.

	-Daniel
*This .sig left intentionally blank*
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using url.insteadOf in git-clone, Pieter de Bie, (Fri Jun 27, 2:35 am)
[PATCH 1/2] clone: respect the settings in $HOME/.gitconfi ..., Johannes Schindelin, (Fri Jun 27, 5:55 am)
[PATCH 2/2] clone: respect url.insteadOf setting in global ..., Johannes Schindelin, (Fri Jun 27, 5:56 am)
Re: Using url.insteadOf in git-clone, Junio C Hamano, (Fri Jun 27, 10:11 am)
Re: Using url.insteadOf in git-clone, Pieter de Bie, (Sun Jun 29, 11:59 am)
Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitc ..., Johannes Schindelin, (Sun Jun 29, 2:49 pm)
Re: [PATCH 2/2] clone: respect url.insteadOf setting in gl ..., Johannes Schindelin, (Sun Jun 29, 2:50 pm)
Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitc ..., Johannes Schindelin, (Sun Jun 29, 5:41 pm)
Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitc ..., Daniel Barkalow, (Sun Jun 29, 6:54 pm)
Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitc ..., Johannes Schindelin, (Mon Jun 30, 4:37 am)
Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitc ..., Johannes Schindelin, (Mon Jun 30, 4:57 am)