From fce4254719a628b469c7a8c1a2ceb025e630bf2a Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 20 Aug 2007 16:36:58 +0200 Subject: [PATCH] Fix an infinite loop in setup_git_directory_gently(). When a git command was invoked outside any git directory, it would not terminate. --- setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.c b/setup.c index d575529ac9..404191ab8f 100644 --- a/setup.c +++ b/setup.c @@ -302,7 +302,7 @@ const char *setup_git_directory_gently(int *nongit_ok) } chdir(".."); do { - if (!offset) { + if (offset <= minoffset) { if (nongit_ok) { if (chdir(cwd)) die("Cannot come back to cwd");