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:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 16:58:47 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:36 +0300
commitcb338c23d6d518947bf6f7240bf30e2ec232bd3b (patch)
tree03396382848bae350d813b706265918cd93f1ba2 /builtin/log.c
parentd850b7a545fcfbd97460a921c7f7c59d933eb0f7 (diff)
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/log.c')
-rw-r--r--builtin/log.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c
index b4c38f6ad8..5604b4b5f0 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1649,7 +1649,9 @@ static struct commit *get_base_commit(const char *base_commit,
return NULL;
}
commit = lookup_commit_or_die(&oid, "upstream base");
- base_list = get_merge_bases_many(commit, total, list);
+ base_list = repo_get_merge_bases_many(the_repository,
+ commit, total,
+ list);
/* There should be one and only one merge base. */
if (!base_list || base_list->next) {
if (die_on_failure) {
@@ -1683,7 +1685,9 @@ static struct commit *get_base_commit(const char *base_commit,
while (rev_nr > 1) {
for (i = 0; i < rev_nr / 2; i++) {
struct commit_list *merge_base;
- merge_base = get_merge_bases(rev[2 * i], rev[2 * i + 1]);
+ merge_base = repo_get_merge_bases(the_repository,
+ rev[2 * i],
+ rev[2 * i + 1]);
if (!merge_base || merge_base->next) {
if (die_on_failure) {
die(_("failed to find exact merge base"));
@@ -1701,7 +1705,7 @@ static struct commit *get_base_commit(const char *base_commit,
rev_nr = DIV_ROUND_UP(rev_nr, 2);
}
- if (!in_merge_bases(base, rev[0])) {
+ if (!repo_in_merge_bases(the_repository, base, rev[0])) {
if (die_on_failure) {
die(_("base commit should be the ancestor of revision list"));
} else {