index 03cd84f2fcbf9cdbc25116308a9c2c9407af8e71..63f5368d901564010d0575485cd07e6b90bdf173 100644 (file)
--- a/setup.c
+++ b/setup.c
const char *prefix;
prefix = setup_git_directory_gently_1(nongit_ok);
+ if (prefix)
+ setenv("GIT_PREFIX", prefix, 1);
+ else
+ setenv("GIT_PREFIX", "", 1);
+
if (startup_info) {
startup_info->have_repository = !nongit_ok || !*nongit_ok;
startup_info->prefix = prefix;