cat-file: use oidset check-and-insert
authorJeff King <redacted>
Tue, 14 Aug 2018 18:14:27 +0000 (14:14 -0400)
committerJunio C Hamano <redacted>
Tue, 14 Aug 2018 19:27:53 +0000 (12:27 -0700)
commitced9fff75dad2578d7583ba3085970b03c66c57b
treeb73d1184e775ad9e276916dc9ea1c42efcd00f8e
parent0750bb5b51f021ecad6f33b7ec88cdfc2a8cdff4
cat-file: use oidset check-and-insert

We don't need to check if the oidset has our object before
we insert it; that's done as part of the insertion. We can
just rely on the return value from oidset_insert(), which
saves one hash lookup per object.

This measurable speedup is tiny and within the run-to-run
noise, but the result is simpler to read, too.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/cat-file.c
git clone https://git.99rst.org/PROJECT