]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-clone.c
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
[thirdparty/git.git] / builtin-clone.c
index 9c028e76a56b32a817ae4c9f72ed8b2aa064f43f..e9ecb5d21a1629762188d0bb34c9de5d84053114 100644 (file)
@@ -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);