summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-04 22:24:12 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-04 22:24:12 (GMT)
commit562cefbdbfaeb92f91c961c67960a93a7772220c (patch)
tree7377e4984f25f9b7101d5d9a7c66eb213c2527b0
parentaca085e577688108a2480b96a2f7077424a74e4d (diff)
downloadgit-562cefbdbfaeb92f91c961c67960a93a7772220c.zip
git-562cefbdbfaeb92f91c961c67960a93a7772220c.tar.gz
git-562cefbdbfaeb92f91c961c67960a93a7772220c.tar.bz2
receive-pack: do not insist on fast-forward outside refs/heads/
Especially refs/tags/ hierarchy should match what git-fetch checks. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--receive-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c
index d56898c..f189151 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -118,7 +118,8 @@ static int update(struct command *cmd)
return error("unpack should have generated %s, "
"but I can't find it!", new_hex);
}
- if (deny_non_fast_forwards && !is_null_sha1(old_sha1)) {
+ if (deny_non_fast_forwards && !is_null_sha1(old_sha1) &&
+ !strncmp(name, "refs/heads/", 11)) {
struct commit *old_commit, *new_commit;
struct commit_list *bases, *ent;