[PATCH] Fix test failure due to overly strict .git directory tests
[git.git] / setup.c
diff --git a/setup.c b/setup.c
index 453bddb..896fca5 100644 (file)
--- 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