Skip to content

Commit 831c61c

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62798a7 commit 831c61c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t3103-ls-tree-misc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ test_expect_success 'setup' '
1717
'
1818

1919
test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
20-
rm -f .git/objects/5f/cffbd6e4c5c5b8d81f5e9314b20e338e3ffff5 &&
20+
tree=$(git rev-parse HEAD:a) &&
21+
rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") &&
2122
test_must_fail git ls-tree -r HEAD
2223
'
2324

0 commit comments

Comments
 (0)