summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-10-18 04:56:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-28 05:05:17 (GMT)
commitd40bbc109b6f5d9e5e5088095cc33fef2e25971e (patch)
treea4ce832baf9d696b6c4fa951feab15e4519d6f4e /fsck.c
parenta59cfb32300baab00ee9cec68326309f4b2faca9 (diff)
downloadgit-d40bbc109b6f5d9e5e5088095cc33fef2e25971e.zip
git-d40bbc109b6f5d9e5e5088095cc33fef2e25971e.tar.gz
git-d40bbc109b6f5d9e5e5088095cc33fef2e25971e.tar.bz2
fsck_describe_object(): build on our get_object_name() primitive
This isolates the implementation detail of using the decoration code to our put/get functions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fsck.c b/fsck.c
index ecd5957..b0c4de6 100644
--- a/fsck.c
+++ b/fsck.c
@@ -351,10 +351,7 @@ const char *fsck_describe_object(struct fsck_options *options,
};
static int b = 0;
struct strbuf *buf;
- char *name = NULL;
-
- if (options->object_names)
- name = lookup_decoration(options->object_names, obj);
+ const char *name = fsck_get_object_name(options, obj);
buf = bufs + b;
b = (b + 1) % ARRAY_SIZE(bufs);