From d29d5001e9614871e05410362b20e1f0a76157a6 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 21 May 2018 02:01:42 +0000 Subject: [PATCH] t/lib-diff-alternative: abstract away SHA-1-specific constants Adjust the test code so that it computes variables for blobs instead of using hard-coded hashes. This makes t4033 and t4050 (the patience and histogram tests) pass. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- t/lib-diff-alternative.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/lib-diff-alternative.sh b/t/lib-diff-alternative.sh index 8b4dbf22d2d140..8d1e408bb58f5e 100644 --- a/t/lib-diff-alternative.sh +++ b/t/lib-diff-alternative.sh @@ -59,9 +59,11 @@ int main(int argc, char **argv) } EOF - cat >expect <<\EOF + file1=$(git rev-parse --short $(git hash-object file1)) + file2=$(git rev-parse --short $(git hash-object file2)) + cat >expect <expect <<\EOF + uniq1=$(git rev-parse --short $(git hash-object uniq1)) + uniq2=$(git rev-parse --short $(git hash-object uniq2)) + cat >expect <