1. Stefan Saasen
  2. git


Junio C Hamano  committed ba96aa6 Merge

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

  • Participants
  • Parent commits 2532d89, 3f4f4cc
  • Branches master

Comments (0)

Files changed (1)

File builtin/clone.c

View file
-	setenv(CONFIG_ENVIRONMENT, mkpath("%s/config", git_dir), 1);
 	if (safe_create_leading_directories_const(git_dir) < 0)
 		die(_("could not create leading directories of '%s'"), git_dir);
 	init_db(option_template, INIT_DB_QUIET);
-	/*
-	 * 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.
-	 */
 	git_config(git_default_config, NULL);
 	if (option_bare) {