summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 15:58:46 +0200
committerJunio C Hamano <gitster@pobox.com>2023-03-28 07:36:36 -0700
commitd850b7a545fcfbd97460a921c7f7c59d933eb0f7 (patch)
treee36940d63b92557a8d930301ff96e70e55cc222d /builtin/describe.c
parent7258e892d2c0f7a615562656e9978f39f610c056 (diff)
downloadgit-d850b7a545fcfbd97460a921c7f7c59d933eb0f7.tar.gz
cocci: apply the "cache.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "cache.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index eea1e330c0..c85bf9c418 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -298,7 +298,8 @@ static void append_name(struct commit_name *n, struct strbuf *dst)
static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)
{
- strbuf_addf(dst, "-%d-g%s", depth, find_unique_abbrev(oid, abbrev));
+ strbuf_addf(dst, "-%d-g%s", depth,
+ repo_find_unique_abbrev(the_repository, oid, abbrev));
}
static void describe_commit(struct object_id *oid, struct strbuf *dst)
@@ -531,7 +532,7 @@ static void describe(const char *arg, int last_one)
if (debug)
fprintf(stderr, _("describe %s\n"), arg);
- if (get_oid(arg, &oid))
+ if (repo_get_oid(the_repository, arg, &oid))
die(_("Not a valid object name %s"), arg);
cmit = lookup_commit_reference_gently(the_repository, &oid, 1);