From: Jeff King Date: Fri, 18 Oct 2019 04:56:38 +0000 (-0400) Subject: fsck_describe_object(): build on our get_object_name() primitive X-Git-Tag: v2.25.0-rc0~133^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d40bbc109b6f5d9e5e5088095cc33fef2e25971e;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/fsck.c b/fsck.c index ecd5957362..b0c4de67c9 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);