aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 41e298b8f..3d2d9580f 100644
--- a/setup.c
+++ b/setup.c
@@ -326,6 +326,14 @@ const char *setup_git_directory_gently(int *nongit_ok)
int len, offset;
/*
+ * Let's assume that we are in a git repository.
+ * If it turns out later that we are somewhere else, the value will be
+ * updated accordingly.
+ */
+ if (nongit_ok)
+ *nongit_ok = 0;
+
+ /*
* If GIT_DIR is set explicitly, we're not going
* to do any discovery, but we still do repository
* validation.