diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-05-13 02:24:22 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-14 11:02:01 +0900 |
commit | 831c61cc6bb18e65ed61e360c6a3954c6abf7ed1 (patch) | |
tree | 31bc73917f2d310452d716464ca427a194a39c48 /t | |
parent | t2203: abstract away SHA-1-specific constants (diff) | |
download | tgif-831c61cc6bb18e65ed61e360c6a3954c6abf7ed1.tar.xz |
t3103: abstract away SHA-1-specific constants
Adjust the test so that it uses variables and command substitution for
trees instead of hard-coded hashes. This also has the benefit of making
it more obvious how the test works.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3103-ls-tree-misc.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t3103-ls-tree-misc.sh b/t/t3103-ls-tree-misc.sh index 09dcf043fd..14520913af 100755 --- a/t/t3103-ls-tree-misc.sh +++ b/t/t3103-ls-tree-misc.sh @@ -17,7 +17,8 @@ test_expect_success 'setup' ' ' test_expect_success 'ls-tree fails with non-zero exit code on broken tree' ' - rm -f .git/objects/5f/cffbd6e4c5c5b8d81f5e9314b20e338e3ffff5 && + tree=$(git rev-parse HEAD:a) && + rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") && test_must_fail git ls-tree -r HEAD ' |