René Scharfe [off-list ref] writes:
quoted hunk
There are five more sites in git.c, path.c and setup.c where $GIT_DIR
is set directly with setenv(). I wonder if they should better call
set_git_dir() instead, too.
diff --git a/setup.c b/setup.c
index 710e2f3..5fb9b25 100644
--- a/setup.c
+++ b/setup.c
@@ -406,7 +406,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
cwd[offset] = '\0';
setenv(GIT_DIR_ENVIRONMENT, cwd, 1);
} else
- setenv(GIT_DIR_ENVIRONMENT, ".", 1);
+ set_git_dir(".");
check_repository_format_gently(nongit_ok);
return NULL;
}
Yeah, shouldn't the other setenv() we see in the context need a similar
change as well?