提交 1aad91f5 编写于 作者: S Shawn O. Pearce 提交者: Junio C Hamano

Correct builtin-fetch to handle + in refspecs

If we are fetching to a local reference (the so called peer_ref) and
the refspec that created this ref/peer_ref association had started
with '+' we are supposed to allow a non-fast-forward update during
fetch, even if --force was not supplied on the command line.  The
builtin-fetch implementation was not honoring this setting as it
was copied from the wrong struct ref instance.
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 b888d61c
......@@ -217,7 +217,7 @@ static void store_updated_refs(const char *url, struct ref *ref_map)
strcpy(ref->name, rm->peer_ref->name);
hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
hashcpy(ref->new_sha1, rm->old_sha1);
ref->force = rm->force;
ref->force = rm->peer_ref->force;
}
commit = lookup_commit_reference(rm->old_sha1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册