Merge branch 'jc/no-git-config-in-clone'
We stopped paying attention to $GIT_CONFIG environment that points at a single configuration file from any command other than "git config" quite a while ago, but "git clone" internally set, exported, and then unexported the variable during its operation unnecessarily. * jc/no-git-config-in-clone: clone: do not export and unexport GIT_CONFIG
This commit is contained in:
commit
ba96aa67be
@ -767,8 +767,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
|
|||||||
atexit(remove_junk);
|
atexit(remove_junk);
|
||||||
sigchain_push_common(remove_junk_on_signal);
|
sigchain_push_common(remove_junk_on_signal);
|
||||||
|
|
||||||
setenv(CONFIG_ENVIRONMENT, mkpath("%s/config", git_dir), 1);
|
|
||||||
|
|
||||||
if (safe_create_leading_directories_const(git_dir) < 0)
|
if (safe_create_leading_directories_const(git_dir) < 0)
|
||||||
die(_("could not create leading directories of '%s'"), git_dir);
|
die(_("could not create leading directories of '%s'"), git_dir);
|
||||||
|
|
||||||
@ -787,13 +785,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
|
|||||||
init_db(option_template, INIT_DB_QUIET);
|
init_db(option_template, INIT_DB_QUIET);
|
||||||
write_config(&option_config);
|
write_config(&option_config);
|
||||||
|
|
||||||
/*
|
|
||||||
* 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);
|
|
||||||
|
|
||||||
git_config(git_default_config, NULL);
|
git_config(git_default_config, NULL);
|
||||||
|
|
||||||
if (option_bare) {
|
if (option_bare) {
|
||||||
|
Loading…
Reference in New Issue
Block a user