Browse Source

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>
maint
Jeff King 5 years ago committed by Junio C Hamano
parent
commit
d40bbc109b
  1. 5
      fsck.c

5
fsck.c

@ -351,10 +351,7 @@ const char *fsck_describe_object(struct fsck_options *options,
}; };
static int b = 0; static int b = 0;
struct strbuf *buf; struct strbuf *buf;
char *name = NULL; const char *name = fsck_get_object_name(options, obj);

if (options->object_names)
name = lookup_decoration(options->object_names, obj);


buf = bufs + b; buf = bufs + b;
b = (b + 1) % ARRAY_SIZE(bufs); b = (b + 1) % ARRAY_SIZE(bufs);

Loading…
Cancel
Save