提交 5b8063b5 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

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: NJohannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 bc0c0d81
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册