From e4c565230450b70d78764a87553af7900c6b4064 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 21 May 2018 02:01:44 +0000 Subject: [PATCH] t4042: 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 --- t/t4042-diff-textconv-caching.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/t/t4042-diff-textconv-caching.sh b/t/t4042-diff-textconv-caching.sh index 04a44d5c61..bf33aedf4b 100755 --- a/t/t4042-diff-textconv-caching.sh +++ b/t/t4042-diff-textconv-caching.sh @@ -15,9 +15,13 @@ test_expect_success 'setup' ' echo bar content 1 >bar.bin && git add . && git commit -m one && + foo1=$(git rev-parse --short HEAD:foo.bin) && + bar1=$(git rev-parse --short HEAD:bar.bin) && echo foo content 2 >foo.bin && echo bar content 2 >bar.bin && git commit -a -m two && + foo2=$(git rev-parse --short HEAD:foo.bin) && + bar2=$(git rev-parse --short HEAD:bar.bin) && echo "*.bin diff=magic" >.gitattributes && git config diff.magic.textconv ./helper && git config diff.magic.cachetextconv true @@ -25,14 +29,14 @@ test_expect_success 'setup' ' cat >expect <expect <expect <