From: brian m. carlson Date: Sun, 13 May 2018 02:24:29 GMT Subject: [PATCH v2 19/28] t4022: abstract away SHA-1-specific constants Message-ID: <20180513022438.60003-20-sandals@crustytoothpaste.net> In-Reply-To: <20180513022438.60003-1-sandals@crustytoothpaste.net> Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4022-diff-rewrite.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh index cb51d9f9d4..0f1287a8ce 100755 --- a/t/t4022-diff-rewrite.sh +++ b/t/t4022-diff-rewrite.sh @@ -13,6 +13,7 @@ test_expect_success setup ' "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \ <"$TEST_DIRECTORY"/../COPYING >test && echo "to be deleted" >test2 && + blob=$(git rev-parse --short $(git hash-object test2)) && git add test2 ' @@ -27,7 +28,7 @@ test_expect_success 'detect rewrite' ' cat >expect <expect <