summaryrefslogtreecommitdiff
path: root/builtin-clone.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-06-27 12:55:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-30 06:16:32 (GMT)
commit5b8063b5b0f56f0da345e8dd7c66d3aced1af673 (patch)
tree598224878a8e02f23f6b31ba643be419a1e235e9 /builtin-clone.c
parentbc0c0d81561bdbb8cb5e1f3af558390f1a0c86cb (diff)
downloadgit-5b8063b5b0f56f0da345e8dd7c66d3aced1af673.zip
git-5b8063b5b0f56f0da345e8dd7c66d3aced1af673.tar.gz
git-5b8063b5b0f56f0da345e8dd7c66d3aced1af673.tar.bz2
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>
Diffstat (limited to 'builtin-clone.c')
-rw-r--r--builtin-clone.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin-clone.c b/builtin-clone.c
index 9c028e7..e9ecb5d 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);