Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-08-17 06:50:37 +0400
committerJunio C Hamano <junkio@cox.net>2005-08-17 08:33:22 +0400
commita579defe5a43bdd242d79750039758f319b82a38 (patch)
tree212f9d0700ca436e7f23e6842ec98a604830f74b /setup.c
parentd288a70030eaa5c205a72b4548635e17f8e523c0 (diff)
[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>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/setup.c b/setup.c
index 453bddbb17..896fca5032 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