aboutsummaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-12 13:02:09 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-12 13:02:09 -0800
commit222b1673860bba6c75895ce3e2d1467fb878fa2a (patch)
treec9f968c6ebd248110fefd5fef9b901262e6faa47 /path.c
parenta8344abe0f70f9fc629ee055d73ffa65fbc58311 (diff)
downloadgit-222b1673860bba6c75895ce3e2d1467fb878fa2a.tar.gz
git-222b1673860bba6c75895ce3e2d1467fb878fa2a.tar.xz
Revert "validate_headref: tighten ref-matching to just branches"
This reverts commit b229d18a809c169314b7f0d048dc5a7632e8f916, at least until we figure out how to work better with TopGit that points HEAD to refs/top-bases/ hierarchy.
Diffstat (limited to 'path.c')
-rw-r--r--path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/path.c b/path.c
index dd22370e8..4b9107fed 100644
--- a/path.c
+++ b/path.c
@@ -154,7 +154,7 @@ int validate_headref(const char *path)
/* Make sure it is a "refs/.." symlink */
if (S_ISLNK(st.st_mode)) {
len = readlink(path, buffer, sizeof(buffer)-1);
- if (len >= 11 && !memcmp("refs/heads/", buffer, 11))
+ if (len >= 5 && !memcmp("refs/", buffer, 5))
return 0;
return -1;
}
@@ -178,7 +178,7 @@ int validate_headref(const char *path)
len -= 4;
while (len && isspace(*buf))
buf++, len--;
- if (len >= 11 && !memcmp("refs/heads/", buf, 11))
+ if (len >= 5 && !memcmp("refs/", buf, 5))
return 0;
}