@matheusbsbs / matheus-bagliano / commits / 41e95f6990
Fork 0

setup_git_directory_gently: do not barf when GIT_DIR is given.

Earlier we barfed when GIT_DIR environment variable points at a directory yet to be created, which made it impossible to use configuration mechanism in "git-init-db". Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Matthias Lederhofer committed Jul 30, 2006 at 03:30 UTC 41e95f699088b14c6a949ec858499f98df4f34f6
1 file changed +4
setup.c
+4
@@ -184,6 +184,10 @@ const char *setup_git_directory_gently(int *nongit_ok)
184 }
185 return NULL;
186 bad_dir_environ:
187 + if (!nongit_ok) {
188 + *nongit_ok = 1;
189 + return NULL;
190 + }
191 path[len] = 0;
192 die("Not a git repository: '%s'", path);
193 }