Merge branch 'jc/merge-bases'
Optimise the "merge-base" computation a bit, and also update its users that do not need the full merge-base information to call a cheaper subset. * jc/merge-bases: reduce_heads(): reimplement on top of remove_redundant() merge-base: "--is-ancestor A B" get_merge_bases_many(): walk from many tips in parallel in_merge_bases(): use paint_down_to_common() merge_bases_many(): split out the logic to paint history in_merge_bases(): omit unnecessary redundant common ancestor reduction http-push: use in_merge_bases() for fast-forward check receive-pack: use in_merge_bases() for fast-forward check in_merge_bases(): support only one "other" commit
This commit is contained in:
@ -1610,9 +1610,8 @@ static int verify_merge_base(unsigned char *head_sha1, struct ref *remote)
|
||||
{
|
||||
struct commit *head = lookup_commit_or_die(head_sha1, "HEAD");
|
||||
struct commit *branch = lookup_commit_or_die(remote->old_sha1, remote->name);
|
||||
struct commit_list *merge_bases = get_merge_bases(head, branch, 1);
|
||||
|
||||
return (merge_bases && !merge_bases->next && merge_bases->item == branch);
|
||||
return in_merge_bases(branch, head);
|
||||
}
|
||||
|
||||
static int delete_remote_branch(const char *pattern, int force)
|
||||
|
||||
Reference in New Issue
Block a user