]> git.ipfire.org Git - thirdparty/git.git/commit
cat-file: use type enum instead of buffer for -t option
authorJeff King <peff@peff.net>
Fri, 16 May 2025 04:49:47 +0000 (00:49 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 May 2025 16:43:10 +0000 (09:43 -0700)
commitaac2abeca7077aa5f87f4132b98d37dd938b3573
tree56beec1c1092a866dfb13ce869e278be27c002ee
parentae24b032a04ccd1565cb1ce13317b56daa77ce7f
cat-file: use type enum instead of buffer for -t option

Now that we no longer support OBJECT_INFO_ALLOW_UNKNOWN_TYPE, there is
no need to pass a strbuf into oid_object_info_extended() to record the
type. The regular object_type enum is sufficient to capture all of the
types we will allow.

This simplifies the code a bit, and will eventually let us drop
object_info's type_name strbuf support.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c