4 Miscellaneous tests for git ls-tree.
6 1. git ls-tree fails in presence of tree damage.
10 TEST_PASSES_SANITIZE_LEAK
=true
13 test_expect_success
'setup' '
20 test_expect_success
'ls-tree fails with non-zero exit code on broken tree' '
21 tree=$(git rev-parse HEAD:a) &&
22 rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") &&
23 test_must_fail git ls-tree -r HEAD
27 "--long --name-only" \
28 "--name-only --name-status" \
29 "--name-status --object-only" \
30 "--object-only --long"
32 test_expect_success
"usage: incompatible options: $opts" '
33 test_expect_code 129 git ls-tree $opts $tree
36 one_opt
=$
(echo "$opts" | cut
-d' ' -f1)
37 test_expect_success
"usage: incompatible options: $one_opt and --format" '
38 test_expect_code 129 git ls-tree $one_opt --format=fmt $tree