@matheusbsbs / matheus-bagliano / commits / d40bbc109b
Fork 0

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>

Jeff King committed Oct 18, 2019 at 00:56 UTC d40bbc109b6f5d9e5e5088095cc33fef2e25971e
1 file changed +1 -4
fsck.c
+1 -4
@@ -351,10 +351,7 @@ const char *fsck_describe_object(struct fsck_options *options,
351 };
352 static int b = 0;
353 struct strbuf *buf;
354 - char *name = NULL;
355 -
356 - if (options->object_names)
357 - name = lookup_decoration(options->object_names, obj);
354 + const char *name = fsck_get_object_name(options, obj);
355
356 buf = bufs + b;
357 b = (b + 1) % ARRAY_SIZE(bufs);