summaryrefslogtreecommitdiff
path: root/t/t2203-add-intent.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-13 02:24:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-14 02:02:01 (GMT)
commit62798a7037e43dae17f0ce009d3dce131fd93182 (patch)
tree3ecc484b9e5769e26b0c01dd037dbaa6e9d8afba /t/t2203-add-intent.sh
parent2bc3d1266842ffb4b46c68900ebbd9a7e0887774 (diff)
downloadgit-62798a7037e43dae17f0ce009d3dce131fd93182.zip
git-62798a7037e43dae17f0ce009d3dce131fd93182.tar.gz
git-62798a7037e43dae17f0ce009d3dce131fd93182.tar.bz2
t2203: 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>
Diffstat (limited to 't/t2203-add-intent.sh')
-rwxr-xr-xt/t2203-add-intent.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index 1797f94..04d840a 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -27,8 +27,8 @@ test_expect_success 'git status' '
test_expect_success 'git status with porcelain v2' '
git status --porcelain=v2 | grep -v "^?" >actual &&
- nam1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d &&
- nam2=ce013625030ba8dba906f756967f9e9ca394464a &&
+ nam1=$(echo 1 | git hash-object --stdin) &&
+ nam2=$(git hash-object elif) &&
cat >expect <<-EOF &&
1 DA N... 100644 000000 100644 $nam1 $ZERO_OID 1.t
1 A. N... 000000 100644 100644 $ZERO_OID $nam2 elif
@@ -181,7 +181,7 @@ test_expect_success 'rename detection finds the right names' '
EOF
test_cmp expected.2 actual.2 &&
- hash=12f00e90b6ef79117ce6e650416b8cf517099b78 &&
+ hash=$(git hash-object third) &&
git status --porcelain=v2 | grep -v "^?" >actual.3 &&
cat >expected.3 <<-EOF &&
2 .R N... 100644 100644 100644 $hash $hash R100 third first
@@ -212,7 +212,7 @@ test_expect_success 'double rename detection in status' '
EOF
test_cmp expected.2 actual.2 &&
- hash=12f00e90b6ef79117ce6e650416b8cf517099b78 &&
+ hash=$(git hash-object third) &&
git status --porcelain=v2 | grep -v "^?" >actual.3 &&
cat >expected.3 <<-EOF &&
2 R. N... 100644 100644 100644 $hash $hash R100 second first