Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
25
t/t3103-ls-tree-misc.sh
Executable file
25
t/t3103-ls-tree-misc.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='
|
||||
Miscellaneous tests for git ls-tree.
|
||||
|
||||
1. git ls-tree fails in presence of tree damage.
|
||||
|
||||
'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'setup' '
|
||||
mkdir a &&
|
||||
touch a/one &&
|
||||
git add a/one &&
|
||||
git commit -m test
|
||||
'
|
||||
|
||||
test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
|
||||
tree=$(git rev-parse HEAD:a) &&
|
||||
rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") &&
|
||||
test_must_fail git ls-tree -r HEAD
|
||||
'
|
||||
|
||||
test_done
|
||||
Loading…
Add table
Add a link
Reference in a new issue