DORMANTno replies

[PATCH] Fix git_setup_directory_gently when GIT_DIR is set

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:28
Subsystem: the rest · Maintainer: Linus Torvalds

When calling git_setup_directory_gently, and GIT_DIR was set, it just
ignored the variable nongit_ok.

Signed-off-by: Johannes Schindelin <redacted>
---
 setup.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/setup.c b/setup.c
index fe7f884..74301c2 100644
--- a/setup.c
+++ b/setup.c
@@ -184,6 +184,10 @@ const char *setup_git_directory_gently(i
 		}
 		return NULL;
 	bad_dir_environ:
+		if (nongit_ok) {
+			*nongit_ok = 1;
+			return NULL;
+		}
 		path[len] = 0;
 		die("Not a git repository: '%s'", path);
 	}
-- 
1.3.3.gdb440-dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help