summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2019-12-21 19:49:17 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-01-15 14:06:18 -0800
commit194264c185515c67feed1972b735162c38054dbe (patch)
treeeec18befb1f58310d0475796e437452fe7279093 /t
parentMerge branch 'am/pathspec-from-file' (diff)
downloadtgif-194264c185515c67feed1972b735162c38054dbe.tar.xz
t4054: make hash-size independent
Instead of hard-coding the length of an object ID when creating a tree, generate it based on $ZERO_OID. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4054-diff-bogus-tree.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t4054-diff-bogus-tree.sh b/t/t4054-diff-bogus-tree.sh
index fcae82fffa..8c95f152b2 100755
--- a/t/t4054-diff-bogus-tree.sh
+++ b/t/t4054-diff-bogus-tree.sh
@@ -4,8 +4,9 @@ test_description='test diff with a bogus tree containing the null sha1'
. ./test-lib.sh
test_expect_success 'create bogus tree' '
+ name=$(echo $ZERO_OID | sed -e "s/00/Q/g") &&
bogus_tree=$(
- printf "100644 fooQQQQQQQQQQQQQQQQQQQQQ" |
+ printf "100644 fooQ$name" |
q_to_nul |
git hash-object -w --stdin -t tree
)