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>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2023-03-28 15:58:47 +02:00
committed by Junio C Hamano
parent d850b7a545
commit cb338c23d6
26 changed files with 72 additions and 60 deletions

View File

@@ -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;