Code

setenv(GIT_DIR) clean-up
[git.git] / setup.c
diff --git a/setup.c b/setup.c
index 710e2f3008c79c08cdc507288881c9a58311283a..b38cbee145e8f3aa13d79cd80640841ec2fb350e 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -404,9 +404,9 @@ const char *setup_git_directory_gently(int *nongit_ok)
                                inside_work_tree = 0;
                        if (offset != len) {
                                cwd[offset] = '\0';
-                               setenv(GIT_DIR_ENVIRONMENT, cwd, 1);
+                               set_git_dir(cwd);
                        } else
-                               setenv(GIT_DIR_ENVIRONMENT, ".", 1);
+                               set_git_dir(".");
                        check_repository_format_gently(nongit_ok);
                        return NULL;
                }