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