From: Linus Torvalds Date: Wed, 17 Aug 2005 02:50:37 +0000 (-0700) Subject: [PATCH] Fix test failure due to overly strict .git directory tests X-Git-Tag: v0.99.5~17^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a579defe5a43bdd242d79750039758f319b82a38;p=git.git [PATCH] Fix test failure due to overly strict .git directory tests We may not actually have a valid HEAD at all times, so relax the validity tests for a .git subdirectory accordingly. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- diff --git a/setup.c b/setup.c index 453bddbb..896fca50 100644 --- a/setup.c +++ b/setup.c @@ -81,10 +81,9 @@ const char *setup_git_directory(void) offset = len = strlen(cwd); for (;;) { /* - * We always want to see a .git/HEAD and a .git/refs/ - * subdirectory + * We always want to see a .git/refs/ subdirectory */ - if (!access(".git/HEAD", R_OK) && !access(".git/refs/", X_OK)) { + if (!access(".git/refs/", X_OK)) { /* * Then we need either a GIT_OBJECT_DIRECTORY define * or a .git/objects/ directory