Merge branch 'ta/t1308-typofix'
[git.git] / t / t3103-ls-tree-misc.sh
blob14520913afca8d1c980e4cd58d0b943a1a498611
1 #!/bin/sh
3 test_description='
4 Miscellaneous tests for git ls-tree.
6 1. git ls-tree fails in presence of tree damage.
10 . ./test-lib.sh
12 test_expect_success 'setup' '
13 mkdir a &&
14 touch a/one &&
15 git add a/one &&
16 git commit -m test
19 test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
20 tree=$(git rev-parse HEAD:a) &&
21 rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") &&
22 test_must_fail git ls-tree -r HEAD
25 test_done