Skip to content

Commit

Permalink
fsck_describe_object(): build on our get_object_name() primitive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and gitster committed Oct 28, 2019
1 parent a59cfb3 commit d40bbc1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fsck.c
Expand Up @@ -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);
Expand Down

0 comments on commit d40bbc1

Please sign in to comment.