Skip to content

Commit 94db7e3

Browse files
bk2204gitster
authored andcommitted
t3206: make hash size independent
Fix the one assertion in this test that still uses SHA-1 to use test_oid to be independent of the hash. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent db12505 commit 94db7e3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

t/t3206-range-diff.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ test_expect_success 'setup' '
102102
n3 sha256:3b0a644
103103
n4 sha256:e461653
104104
105+
# mode change
106+
o1 sha1:4d39cb3
107+
o2 sha1:26c107f
108+
o3 sha1:4c1e0f5
109+
o1 sha256:d0dd598
110+
o2 sha256:c4a279e
111+
o3 sha256:78459d7
112+
105113
# added and removed
106114
s1 sha1:096b1ba
107115
s2 sha1:d92e698
@@ -336,7 +344,7 @@ test_expect_success 'renamed file' '
336344
test_expect_success 'file with mode only change' '
337345
git range-diff --no-color --submodule=log topic...mode-only-change >actual &&
338346
sed s/Z/\ /g >expect <<-EOF &&
339-
1: fccce22 ! 1: 4d39cb3 s/4/A/
347+
1: $(test_oid t2) ! 1: $(test_oid o1) s/4/A/
340348
@@ Metadata
341349
ZAuthor: Thomas Rast <[email protected]>
342350
Z
@@ -352,7 +360,7 @@ test_expect_success 'file with mode only change' '
352360
Z 7
353361
+
354362
+ ## other-file (new) ##
355-
2: 147e64e ! 2: 26c107f s/11/B/
363+
2: $(test_oid t3) ! 2: $(test_oid o2) s/11/B/
356364
@@ Metadata
357365
ZAuthor: Thomas Rast <[email protected]>
358366
Z
@@ -368,7 +376,7 @@ test_expect_success 'file with mode only change' '
368376
Z 14
369377
+
370378
+ ## other-file (mode change 100644 => 100755) ##
371-
3: a63e992 = 3: 4c1e0f5 s/12/B/
379+
3: $(test_oid t4) = 3: $(test_oid o3) s/12/B/
372380
EOF
373381
test_cmp expect actual
374382
'

0 commit comments

Comments
 (0)