@matheusbsbs / matheus-bagliano / commits / 562cefbdbf
Fork 0

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>

Junio C Hamano committed Dec 4, 2006 at 14:24 UTC 562cefbdbfaeb92f91c961c67960a93a7772220c
1 file changed +2 -1
receive-pack.c
+2 -1
@@ -118,7 +118,8 @@ static int update(struct command *cmd)
118 return error("unpack should have generated %s, "
119 "but I can't find it!", new_hex);
120 }
121 - if (deny_non_fast_forwards && !is_null_sha1(old_sha1)) {
121 + if (deny_non_fast_forwards && !is_null_sha1(old_sha1) &&
122 + !strncmp(name, "refs/heads/", 11)) {
123 struct commit *old_commit, *new_commit;
124 struct commit_list *bases, *ent;
125