Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Fri, 27 Jun 2008 12:55:23 +0000
(13:55 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 30 Jun 2008 06:16:32 +0000
(23:16 -0700)
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>
builtin-clone.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
bc0c0d8
)
diff --git
a/builtin-clone.c
b/builtin-clone.c
index 9c028e76a56b32a817ae4c9f72ed8b2aa064f43f..e9ecb5d21a1629762188d0bb34c9de5d84053114 100644
(file)
--- 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);