From: brian m. carlson Date: Mon, 21 May 2018 02:01:38 +0000 (+0000) Subject: t4022: abstract away SHA-1-specific constants X-Git-Tag: v2.18.0-rc0~3^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/10c636a79a3786a5089b345032afe4bc23865a97 t4022: abstract away SHA-1-specific constants Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh index cb51d9f9d4..6d1c3d949c 100755 --- a/t/t4022-diff-rewrite.sh +++ b/t/t4022-diff-rewrite.sh @@ -13,6 +13,8 @@ test_expect_success setup ' "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \ <"$TEST_DIRECTORY"/../COPYING >test && echo "to be deleted" >test2 && + blob=$(git hash-object test2) && + blob=$(git rev-parse --short $blob) && git add test2 ' @@ -27,7 +29,7 @@ test_expect_success 'detect rewrite' ' cat >expect <expect <