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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Feb 7, 2020 at 00:52 UTC
94db7e3e936ddc08c0a34c0c38cbee304a220c20
1 file changed
+11
-3
t/t3206-range-diff.sh
+11
-3
@@ -102,6 +102,14 @@ test_expect_success 'setup' '
102
n3 sha256:3b0a644
103
n4 sha256:e461653
104
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
+
113
# added and removed
114
s1 sha1:096b1ba
115
s2 sha1:d92e698
@@ -336,7 +344,7 @@ test_expect_success 'renamed file' '
344
test_expect_success 'file with mode only change' '
345
git range-diff --no-color --submodule=log topic...mode-only-change >actual &&
346
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/
348
@@ Metadata
349
ZAuthor: Thomas Rast <trast@inf.ethz.ch>
350
Z
@@ -352,7 +360,7 @@ test_expect_success 'file with mode only change' '
360
Z 7
361
+
362
+ ## other-file (new) ##
355
- 2: 147e64e ! 2: 26c107f s/11/B/
363
+ 2: $(test_oid t3) ! 2: $(test_oid o2) s/11/B/
364
@@ Metadata
365
ZAuthor: Thomas Rast <trast@inf.ethz.ch>
366
Z
@@ -368,7 +376,7 @@ test_expect_success 'file with mode only change' '
376
Z 14
377
+
378
+ ## 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/
380
EOF
381
test_cmp expect actual
382
'