Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'commit-reach.c')
-rw-r--r--commit-reach.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/commit-reach.c b/commit-reach.c
index 13722430aa..43e303d5f2 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -303,7 +303,7 @@ static int repo_is_descendant_of(struct repository *r,
other = with_commit->item;
with_commit = with_commit->next;
- if (repo_in_merge_bases(r, other, commit))
+ if (repo_in_merge_bases_many(r, other, 1, &commit))
return 1;
}
return 0;
@@ -355,7 +355,15 @@ int repo_in_merge_bases(struct repository *r,
struct commit *commit,
struct commit *reference)
{
- return repo_in_merge_bases_many(r, commit, 1, &reference);
+ int res;
+ struct commit_list *list = NULL;
+ struct commit_list **next = &list;
+
+ next = commit_list_append(commit, next);
+ res = repo_is_descendant_of(r, reference, list);
+ free_commit_list(list);
+
+ return res;
}
struct commit_list *reduce_heads(struct commit_list *heads)