index ce87900ce3c68ace0f231827bdda0e9a65ef15b3..5ea5502e4881a806ebb3aa9fd38f146cf9f65cf9 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;