Commits

Junio C Hamano  committed 562cefb

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>

  • Participants
  • Parent commits aca085e

Comments (0)

Files changed (1)

File receive-pack.c

 		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;