From 2d5d2c84f18762a50ddc843b560b2b0b53ee1426 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 6 Aug 2007 22:54:41 +0100 Subject: [PATCH] Fix inifinite loop In setup_git_directory_gently(), there is a hack to allow for stopping the search at the drive letter. Only that the patch was incomplete; we really have to stop there, instead of looping infinitely. Signed-off-by: Johannes Schindelin --- setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.c b/setup.c index a1aa5a3076..e921013926 100644 --- a/setup.c +++ b/setup.c @@ -260,7 +260,7 @@ const char *setup_git_directory_gently(int *nongit_ok) for (;;) { if (is_git_directory(".git")) break; - if (offset == 0) { + if (offset == minoffset) { offset = -1; break; } -- 2.11.4.GIT