Re: [PATCH 07/13] oid_object_info(): drop type_name strbuf
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 19, 2025, 14:58 UTC
- Message-ID
- <xmqqtt5gpryr.fsf@gitster.g>
- In-Reply-To
- <20250516044956.GG22242@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> We provide a mechanism for callers to get the object type as a raw > string, rather than an object_type enum. This was in theory useful for > returning types that are not representable in the enum, but we consider > any such type to be an error, and there are no callers that use the > strbuf anymore. > > Let's drop support to simplify the code a bit. > > Signed-off-by: Jeff King <peff@peff.net> > --- > object-file.c | 4 +--- > object-store.c | 2 -- > object-store.h | 1 - > packfile.c | 7 +------ > 4 files changed, 2 insertions(+), 12 deletions(-)
Yup, now we have fixed vocabulary, we can pass around the enum and map them into fixed strings on demand. Nice.