Re: Possible BUG in 'git config'
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 11, 2007, 16:24 UTC
- Message-ID
- <Pine.LNX.4.63.0702111720260.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <e5bfff550702110613q315e1f7es4ca1a88b92e4c3e9@mail.gmail.com>
Hi,
On Sun, 11 Feb 2007, Marco Costalba wrote:
> I would expect git repo-config user.name returns an empty string, > because user.name is defined _only_ in global config file ~/.gitconfig
The whole point of ~/.gitconfig is to store variables to be seen in _all_ repositories.
> How it is possible to know if a variable is stored in local config file?
If you _have_ to, you can use
$ GIT_CONFIG=.git/config git config -l
but I _strongly_ suggest you rethink your workflow if you need that.
$HOME/.gitconfig _really_ is only meant to make it unnecessary to set a variable in _all_ your repositories, and you can even override (although not unset) the variables locally.
So I am certain that you made a mistake when you need to ignore the settings in $HOME/.gitconfig.
Hth, Dscho