1
0
mirror of https://github.com/git/git.git synced 2024-09-28 16:13:01 +02:00

clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig

After initializing the config in the newly-created repository, we
need to unset GIT_CONFIG so that the global configs are read again.

Noticed by Pieter de Bie.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2008-06-27 13:55:23 +01:00 committed by Junio C Hamano
parent bc0c0d8156
commit 5b8063b5b0

@ -420,6 +420,13 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
fprintf(stderr, "Initialize %s\n", git_dir);
init_db(option_template, option_quiet ? INIT_DB_QUIET : 0);
/*
* At this point, the config exists, so we do not need the
* environment variable. We actually need to unset it, too, to
* re-enable parsing of the global configs.
*/
unsetenv(CONFIG_ENVIRONMENT);
if (option_reference)
setup_reference(git_dir);