Skip to content

Commit

Permalink
receive-pack: do not insist on fast-forward outside refs/heads/
Browse files Browse the repository at this point in the history
Especially refs/tags/ hierarchy should match what git-fetch
checks.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Dec 4, 2006
1 parent aca085e commit 562cefb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 562cefb

Please sign in to comment.