show tests: add test for "git show <tree>"
commitdcc0a86f2f2f036b3a379f41a4b754f8bb73ed6b
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 20 Mar 2021 22:37:44 +0000 (20 23:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Mar 2021 23:09:25 +0000 (20 16:09 -0700)
tree3946f4f0df052521932008b82cd822bc02add1bd
parentbe7935ed8bff19f481b033d0d242c5d5f239ed50
show tests: add test for "git show <tree>"

Add missing tests for showing a tree with "git show". Let's test for
showing a tree, two trees, and that doing so doesn't recurse.

The only tests for this code added in 5d7eeee2ac6 (git-show: grok
blobs, trees and tags, too, 2006-12-14) were the tests in
t7701-repack-unpack-unreachable.sh added in ccc1297226b (repack:
modify behavior of -A option to leave unreferenced objects unpacked,
2008-05-09).

Let's add this common mode of operation to the "show" tests
themselves. It's more obvious, and the tests in
t7701-repack-unpack-unreachable.sh happily pass if we start buggily
emitting trees recursively.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7007-show.sh