From: brian m. carlson Date: Sat, 21 Dec 2019 19:49:17 +0000 (+0000) Subject: t4054: make hash-size independent X-Git-Tag: v2.26.0-rc0~93^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=194264c185515c67feed1972b735162c38054dbe;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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 )