提交 562cefbd 编写于 作者: J Junio C Hamano

receive-pack: do not insist on fast-forward outside refs/heads/

Especially refs/tags/ hierarchy should match what git-fetch
checks.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 aca085e5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册