From: Johannes Schindelin Date: Fri, 27 Jun 2008 12:55:23 +0000 (+0100) Subject: clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig X-Git-Tag: v1.5.6.2~3^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b8063b5b0f56f0da345e8dd7c66d3aced1af673;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-clone.c b/builtin-clone.c index 9c028e76a..e9ecb5d21 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -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);