ls-tree: simplify nesting if/else logic in "show_tree()"
commit87af0ddf5f311e9b6e361daaa7fd591a230261a0
authorTeng Long <dyroneteng@gmail.com>
Wed, 23 Mar 2022 09:13:07 +0000 (23 17:13 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Mar 2022 18:38:39 +0000 (23 11:38 -0700)
tree1112af4f653ad1b2b3841ee36a6088d81217d36c
parent889f78383eb1e93663ad38a231607e04a1593713
ls-tree: simplify nesting if/else logic in "show_tree()"

Use the object_type() function to determine the object type from the
"mode" passed to us by read_tree(), instead of doing so with the S_*()
macros.

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