aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 4612f110e..358e139d8 100644
--- a/setup.c
+++ b/setup.c
@@ -184,6 +184,10 @@ const char *setup_git_directory_gently(int *nongit_ok)
}
return NULL;
bad_dir_environ:
+ if (!nongit_ok) {
+ *nongit_ok = 1;
+ return NULL;
+ }
path[len] = 0;
die("Not a git repository: '%s'", path);
}