diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-08-16 19:50:37 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-16 21:33:22 -0700 |
commit | a579defe5a43bdd242d79750039758f319b82a38 (patch) | |
tree | 212f9d0700ca436e7f23e6842ec98a604830f74b | |
parent | [PATCH] Make "git diff" work inside relative subdirectories (diff) | |
download | tgif-a579defe5a43bdd242d79750039758f319b82a38.tar.xz |
[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 <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | setup.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 |