summaryrefslogtreecommitdiff
path: root/t/t6024-recursive-merge.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-02-07 00:52:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-07 19:07:31 (GMT)
commitf3037657e8431073f0b240691877ca32baa142eb (patch)
tree75f787232ca2626d2c2000453e77c93854141ccc /t/t6024-recursive-merge.sh
parentedf04243b2b805c4730c531745e8a5b317cd0a90 (diff)
downloadgit-f3037657e8431073f0b240691877ca32baa142eb.zip
git-f3037657e8431073f0b240691877ca32baa142eb.tar.gz
git-f3037657e8431073f0b240691877ca32baa142eb.tar.bz2
t6024: update for SHA-256
To make this test work with SHA-256, compute two of the items in the conflicted index entry. The other entry is a conflict within a conflict and computing it is difficult, so use test_oid_cache to specify the proper values for both hash algorithms. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6024-recursive-merge.sh')
-rwxr-xr-xt/t6024-recursive-merge.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index 0c9e3c2..332cfc5 100755
--- a/t/t6024-recursive-merge.sh
+++ b/t/t6024-recursive-merge.sh
@@ -57,7 +57,12 @@ test_expect_success 'setup tests' '
git rev-parse C >.git/MERGE_HEAD &&
echo F >a1 &&
git update-index a1 &&
- GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
+ GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F &&
+
+ test_oid_cache <<-EOF
+ idxstage1 sha1:ec3fe2a791706733f2d8fa7ad45d9a9672031f5e
+ idxstage1 sha256:b3c8488929903aaebdeb22270cb6d36e5b8724b01ae0d4da24632f158c99676f
+ EOF
'
test_expect_success 'combined merge conflicts' '
@@ -79,10 +84,10 @@ test_expect_success 'result contains a conflict' '
test_expect_success 'virtual trees were processed' '
git ls-files --stage >out &&
- cat >expect <<-\EOF &&
- 100644 ec3fe2a791706733f2d8fa7ad45d9a9672031f5e 1 a1
- 100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2 a1
- 100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
+ cat >expect <<-EOF &&
+ 100644 $(test_oid idxstage1) 1 a1
+ 100644 $(git rev-parse F:a1) 2 a1
+ 100644 $(git rev-parse G:a1) 3 a1
EOF
test_cmp expect out