mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
[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>
This commit is contained in:
parent
d288a70030
commit
a579defe5a
5
setup.c
5
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
|
||||
|
|
Loading…
Reference in a new issue