Skip to content

Commit 562cefb

Browse files
author
Junio C Hamano
committed
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 <[email protected]>
1 parent aca085e commit 562cefb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

receive-pack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ static int update(struct command *cmd)
118118
return error("unpack should have generated %s, "
119119
"but I can't find it!", new_hex);
120120
}
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)) {
122123
struct commit *old_commit, *new_commit;
123124
struct commit_list *bases, *ent;
124125

0 commit comments

Comments
 (0)