apply: diagnose incomplete submodule object name better
[gitweb.git] / http-push.c
index a832ca77a31245e8ef9c71adcc0d7110fcda1e5c..8701c1215d21cd0413c1d69be91b309984cf6b1f 100644 (file)
@@ -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)