]> git.ipfire.org Git - thirdparty/git.git/commit
ls-tree: use "enum object_type", not {blob,tree,commit}_type
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 23 Mar 2022 09:13:04 +0000 (17:13 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Mar 2022 18:38:39 +0000 (11:38 -0700)
commit26f6d4d5a015ae95b0818140b6edf297e78e4e67
tree300812995147b87c88f69aa5d236c3e2410dea26
parent82e69b0cb5efff33f9359aa0141b05c93001157e
ls-tree: use "enum object_type", not {blob,tree,commit}_type

Change the ls-tree.c code to use type_name() on the enum instead of
using the string constants. This doesn't matter either way for
performance, but makes this a bit easier to read as we'll no longer
need a strcmp() here.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-tree.c