summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0454dd9)
raw | patch | inline | side by side (parent: 0454dd9)
author | David Reiss <dreiss@facebook.com> | |
Tue, 20 May 2008 06:49:34 +0000 (23:49 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 May 2008 21:15:01 +0000 (14:15 -0700) |
In the case where setup_git_directory_gently fails, avoid the last
chdir("..") by moving it after the ceil_offset check.
Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
chdir("..") by moving it after the ceil_offset check.
Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c | patch | blob | history |
index c14b10636faed05a47b4fb755768c4650a1ead76..045ca20b32f4b512e175601fb371ac54dfce8cee 100644 (file)
--- a/setup.c
+++ b/setup.c
check_repository_format_gently(nongit_ok);
return NULL;
}
- chdir("..");
while (--offset > ceil_offset && cwd[offset] != '/');
if (offset <= ceil_offset) {
if (nongit_ok) {
}
die("Not a git repository");
}
+ chdir("..");
}
inside_git_dir = 0;