Skip to content

Commit f303765

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edf0424 commit f303765

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

t/t6024-recursive-merge.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ test_expect_success 'setup tests' '
5757
git rev-parse C >.git/MERGE_HEAD &&
5858
echo F >a1 &&
5959
git update-index a1 &&
60-
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
60+
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F &&
61+
62+
test_oid_cache <<-EOF
63+
idxstage1 sha1:ec3fe2a791706733f2d8fa7ad45d9a9672031f5e
64+
idxstage1 sha256:b3c8488929903aaebdeb22270cb6d36e5b8724b01ae0d4da24632f158c99676f
65+
EOF
6166
'
6267

6368
test_expect_success 'combined merge conflicts' '
@@ -79,10 +84,10 @@ test_expect_success 'result contains a conflict' '
7984
test_expect_success 'virtual trees were processed' '
8085
git ls-files --stage >out &&
8186
82-
cat >expect <<-\EOF &&
83-
100644 ec3fe2a791706733f2d8fa7ad45d9a9672031f5e 1 a1
84-
100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2 a1
85-
100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
87+
cat >expect <<-EOF &&
88+
100644 $(test_oid idxstage1) 1 a1
89+
100644 $(git rev-parse F:a1) 2 a1
90+
100644 $(git rev-parse G:a1) 3 a1
8691
EOF
8792
8893
test_cmp expect out

0 commit comments

Comments
 (0)