From d850b7a545fcfbd97460a921c7f7c59d933eb0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:46 +0200 Subject: cocci: apply the "cache.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "cache.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- range-diff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'range-diff.c') diff --git a/range-diff.c b/range-diff.c index 4bd65ab749..5bcf966f6c 100644 --- a/range-diff.c +++ b/range-diff.c @@ -94,7 +94,7 @@ static int read_patches(const char *range, struct string_list *list, strbuf_reset(&buf); } CALLOC_ARRAY(util, 1); - if (get_oid(p, &util->oid)) { + if (repo_get_oid(the_repository, p, &util->oid)) { error(_("could not parse commit '%s'"), p); FREE_AND_NULL(util); string_list_clear(list, 1); @@ -390,7 +390,7 @@ static void output_pair_header(struct diff_options *diffopt, if (!dashes->len) strbuf_addchars(dashes, '-', - strlen(find_unique_abbrev(oid, abbrev))); + strlen(repo_find_unique_abbrev(the_repository, oid, abbrev))); if (!b_util) { color = color_old; @@ -412,7 +412,7 @@ static void output_pair_header(struct diff_options *diffopt, strbuf_addf(buf, "%*s: %s ", patch_no_width, "-", dashes->buf); else strbuf_addf(buf, "%*d: %s ", patch_no_width, a_util->i + 1, - find_unique_abbrev(&a_util->oid, abbrev)); + repo_find_unique_abbrev(the_repository, &a_util->oid, abbrev)); if (status == '!') strbuf_addf(buf, "%s%s", color_reset, color); @@ -424,7 +424,7 @@ static void output_pair_header(struct diff_options *diffopt, strbuf_addf(buf, " %*s: %s", patch_no_width, "-", dashes->buf); else strbuf_addf(buf, " %*d: %s", patch_no_width, b_util->i + 1, - find_unique_abbrev(&b_util->oid, abbrev)); + repo_find_unique_abbrev(the_repository, &b_util->oid, abbrev)); commit = lookup_commit_reference(the_repository, oid); if (commit) { -- cgit v1.2.3 From 085390328f5fe1dfba67039b1fd6cc51546a4e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:49 +0200 Subject: cocci: apply the "diff.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "diff.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- range-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'range-diff.c') diff --git a/range-diff.c b/range-diff.c index 5bcf966f6c..15d0bc35a8 100644 --- a/range-diff.c +++ b/range-diff.c @@ -485,7 +485,7 @@ static void output(struct string_list *a, struct string_list *b, if (range_diff_opts->diffopt) memcpy(&opts, range_diff_opts->diffopt, sizeof(opts)); else - diff_setup(&opts); + repo_diff_setup(the_repository, &opts); opts.no_free = 1; if (!opts.output_format) -- cgit v1.2.3 From 035c7de9e9ea11d26df5f9e4bb117f91ed11a9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:56 +0200 Subject: cocci: apply the "revision.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "revision.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- range-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'range-diff.c') diff --git a/range-diff.c b/range-diff.c index 15d0bc35a8..ff5d19f8ad 100644 --- a/range-diff.c +++ b/range-diff.c @@ -588,7 +588,7 @@ int is_range_diff_range(const char *arg) int i, positive = 0, negative = 0; struct rev_info revs; - init_revisions(&revs, NULL); + repo_init_revisions(the_repository, &revs, NULL); if (setup_revisions(3, argv, &revs, NULL) == 1) { for (i = 0; i < revs.pending.nr; i++) if (revs.pending.objects[i].item->flags & UNINTERESTING) -- cgit v1.2.3