1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 06:26:13 +02:00

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>
This commit is contained in:
Jeff King 2019-10-18 00:56:38 -04:00 committed by Junio C Hamano
parent a59cfb3230
commit d40bbc109b

5
fsck.c
View File

@ -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);