index 013ad1127534367e64afeec3749e617ceccfb5d4..5ea5502e4881a806ebb3aa9fd38f146cf9f65cf9 100644 (file)
--- a/setup.c
+++ b/setup.c
const char *slash;
struct stat st;
int fd;
- size_t len;
+ ssize_t len;
if (stat(path, &st))
return NULL;
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;