X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup.c;h=63f5368d901564010d0575485cd07e6b90bdf173;hb=1f5d271f5e8f7b1e2a5b296ff43ca4087eb08244;hp=03cd84f2fcbf9cdbc25116308a9c2c9407af8e71;hpb=2dbae5acc7b3d0615bcf534ac85181a3185cb6de;p=git.git diff --git a/setup.c b/setup.c index 03cd84f2f..63f5368d9 100644 --- a/setup.c +++ b/setup.c @@ -602,6 +602,11 @@ const char *setup_git_directory_gently(int *nongit_ok) 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;