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

@ -882,7 +882,7 @@ static int can_fast_forward(struct commit *onto, struct commit *upstream,
if (!upstream)
goto done;
merge_bases = get_merge_bases(upstream, head);
merge_bases = repo_get_merge_bases(the_repository, upstream, head);
if (!merge_bases || merge_bases->next)
goto done;
@ -901,7 +901,8 @@ static void fill_branch_base(struct rebase_options *options,
{
struct commit_list *merge_bases = NULL;
merge_bases = get_merge_bases(options->onto, options->orig_head);
merge_bases = repo_get_merge_bases(the_repository, options->onto,
options->orig_head);
if (!merge_bases || merge_bases->next)
oidcpy(branch_base, null_oid());
else