diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
commit | 5ec6074f0633939fd17d94111d10c6c6b062978c (patch) | |
tree | bfaa17b5a64abc66c918e9c70969e519d9e1df8e /t/t3103-ls-tree-misc.sh | |
parent | Initial commit. (diff) | |
download | git-8c76a719c62c2f3aec291063b6d4d5aaaab1c4ee.tar.xz git-8c76a719c62c2f3aec291063b6d4d5aaaab1c4ee.zip |
Adding upstream version 1:2.30.2.upstream/1%2.30.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t3103-ls-tree-misc.sh')
-rwxr-xr-x | t/t3103-ls-tree-misc.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t3103-ls-tree-misc.sh b/t/t3103-ls-tree-misc.sh new file mode 100755 index 0000000..1452091 --- /dev/null +++ b/t/t3103-ls-tree-misc.sh @@ -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 |