]> git.ipfire.org Git - thirdparty/git.git/blobdiff - setup.c
Merge branch 'maint'
[thirdparty/git.git] / setup.c
diff --git a/setup.c b/setup.c
index 41e298b8f549dcce28fca335c5f5b7fe5aea27bb..3d2d9580f3283b4e4bc741d98863777510bd5173 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -325,6 +325,14 @@ const char *setup_git_directory_gently(int *nongit_ok)
        const char *gitdirenv;
        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