diff options
author | Teng Long <dyroneteng@gmail.com> | 2022-03-23 17:13:09 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-23 11:38:39 -0700 |
commit | 315f22c853c08b1f3473fc50985d76618f31ebd0 (patch) | |
tree | 8cc67a434fbfc0ac54e46d356a5606c930583c56 /builtin/interpret-trailers.c | |
parent | ls-tree: fix "--name-only" and "--long" combined use bug (diff) | |
download | tgif-315f22c853c08b1f3473fc50985d76618f31ebd0.tar.xz |
ls-tree: slightly refactor `show_tree()`
This is a non-functional change, we introduce an enum "ls_tree_cmdmode"
then use it to mark which columns to output.
This has the advantage of making the show_tree logic simpler and more
readable, as well as making it easier to extend new options (for example,
if we want to add a "--object-only" option, we just need to add a similar
"short-circuit logic in "show_tree()").
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/interpret-trailers.c')
0 files changed, 0 insertions, 0 deletions