t4029: 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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
May 21, 2018 at 02:01 UTC
b55ee57277aa4123c5c6afbbbf5127a582342004
1 file changed
+6
-1
t/t4029-diff-trailing-space.sh
+6
-1
@@ -6,7 +6,7 @@ test_description='diff honors config option, diff.suppressBlankEmpty'
6
7
. ./test-lib.sh
8
9
-cat <<\EOF > exp ||
9
+cat <<\EOF >expected ||
10
diff --git a/f b/f
11
index 5f6a263..8cb8bae 100644
12
--- a/f
@@ -20,9 +20,14 @@ exit 1
20
21
test_expect_success "$test_description" '
22
printf "\nx\n" > f &&
23
+ before=$(git hash-object f) &&
24
+ before=$(git rev-parse --short $before) &&
25
git add f &&
26
git commit -q -m. f &&
27
printf "\ny\n" > f &&
28
+ after=$(git hash-object f) &&
29
+ after=$(git rev-parse --short $after) &&
30
+ sed -e "s/^index .*/index $before..$after 100644/" expected >exp &&
31
git config --bool diff.suppressBlankEmpty true &&
32
git diff f > actual &&
33
test_cmp exp actual &&