aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/merge-base.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 15:58:47 +0200
committerJunio C Hamano <gitster@pobox.com>2023-03-28 07:36:36 -0700
commitcb338c23d6d518947bf6f7240bf30e2ec232bd3b (patch)
tree03396382848bae350d813b706265918cd93f1ba2 /builtin/merge-base.c
parentd850b7a545fcfbd97460a921c7f7c59d933eb0f7 (diff)
downloadgit-cb338c23d6d518947bf6f7240bf30e2ec232bd3b.tar.gz
cocci: apply the "commit-reach.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "commit-reach.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-base.c')
-rw-r--r--builtin/merge-base.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 688d5c29b7..64d29136d1 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -13,7 +13,8 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
{
struct commit_list *result, *r;
- result = get_merge_bases_many_dirty(rev[0], rev_nr - 1, rev + 1);
+ result = repo_get_merge_bases_many_dirty(the_repository, rev[0],
+ rev_nr - 1, rev + 1);
if (!result)
return 1;
@@ -105,7 +106,7 @@ static int handle_is_ancestor(int argc, const char **argv)
die("--is-ancestor takes exactly two commits");
one = get_commit_reference(argv[0]);
two = get_commit_reference(argv[1]);
- if (in_merge_bases(one, two))
+ if (repo_in_merge_bases(the_repository, one, two))
return 0;
else
return 1;