@@ -1271,9 +1271,8 @@ test_expect_success 'detect permutations inside moved code -- dimmed_zebra' '
1271
1271
test_config color.diff.newMovedDimmed "normal cyan" &&
1272
1272
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
1273
1273
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
1274
- git diff HEAD --no-renames --color-moved=dimmed_zebra --color |
1275
- grep -v "index" |
1276
- test_decode_color >actual &&
1274
+ git diff HEAD --no-renames --color-moved=dimmed_zebra --color >actual.raw &&
1275
+ grep -v "index" actual.raw | test_decode_color >actual &&
1277
1276
cat <<-\EOF >expected &&
1278
1277
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1279
1278
<BOLD>--- a/lines.txt<RESET>
@@ -1315,9 +1314,8 @@ test_expect_success 'cmd option assumes configured colored-moved' '
1315
1314
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
1316
1315
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
1317
1316
test_config diff.colorMoved zebra &&
1318
- git diff HEAD --no-renames --color-moved --color |
1319
- grep -v "index" |
1320
- test_decode_color >actual &&
1317
+ git diff HEAD --no-renames --color-moved --color >actual.raw &&
1318
+ grep -v "index" actual.raw | test_decode_color >actual &&
1321
1319
cat <<-\EOF >expected &&
1322
1320
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1323
1321
<BOLD>--- a/lines.txt<RESET>
@@ -1395,9 +1393,8 @@ test_expect_success 'move detection ignoring whitespace ' '
1395
1393
line 4
1396
1394
line 5
1397
1395
EOF
1398
- git diff HEAD --no-renames --color-moved --color |
1399
- grep -v "index" |
1400
- test_decode_color >actual &&
1396
+ git diff HEAD --no-renames --color-moved --color >actual.raw &&
1397
+ grep -v "index" actual.raw | test_decode_color >actual &&
1401
1398
cat <<-\EOF >expected &&
1402
1399
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1403
1400
<BOLD>--- a/lines.txt<RESET>
@@ -1419,9 +1416,8 @@ test_expect_success 'move detection ignoring whitespace ' '
1419
1416
EOF
1420
1417
test_cmp expected actual &&
1421
1418
1422
- git diff HEAD --no-renames -w --color-moved --color |
1423
- grep -v "index" |
1424
- test_decode_color >actual &&
1419
+ git diff HEAD --no-renames -w --color-moved --color >actual.raw &&
1420
+ grep -v "index" actual.raw | test_decode_color >actual &&
1425
1421
cat <<-\EOF >expected &&
1426
1422
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1427
1423
<BOLD>--- a/lines.txt<RESET>
@@ -1459,9 +1455,8 @@ test_expect_success 'move detection ignoring whitespace changes' '
1459
1455
line 5
1460
1456
EOF
1461
1457
1462
- git diff HEAD --no-renames --color-moved --color |
1463
- grep -v "index" |
1464
- test_decode_color >actual &&
1458
+ git diff HEAD --no-renames --color-moved --color >actual.raw &&
1459
+ grep -v "index" actual.raw | test_decode_color >actual &&
1465
1460
cat <<-\EOF >expected &&
1466
1461
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1467
1462
<BOLD>--- a/lines.txt<RESET>
@@ -1483,9 +1478,8 @@ test_expect_success 'move detection ignoring whitespace changes' '
1483
1478
EOF
1484
1479
test_cmp expected actual &&
1485
1480
1486
- git diff HEAD --no-renames -b --color-moved --color |
1487
- grep -v "index" |
1488
- test_decode_color >actual &&
1481
+ git diff HEAD --no-renames -b --color-moved --color >actual.raw &&
1482
+ grep -v "index" actual.raw | test_decode_color >actual &&
1489
1483
cat <<-\EOF >expected &&
1490
1484
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1491
1485
<BOLD>--- a/lines.txt<RESET>
@@ -1526,9 +1520,8 @@ test_expect_success 'move detection ignoring whitespace at eol' '
1526
1520
# avoid cluttering the output with complaints about our eol whitespace
1527
1521
test_config core.whitespace -blank-at-eol &&
1528
1522
1529
- git diff HEAD --no-renames --color-moved --color |
1530
- grep -v "index" |
1531
- test_decode_color >actual &&
1523
+ git diff HEAD --no-renames --color-moved --color >actual.raw &&
1524
+ grep -v "index" actual.raw | test_decode_color >actual &&
1532
1525
cat <<-\EOF >expected &&
1533
1526
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1534
1527
<BOLD>--- a/lines.txt<RESET>
@@ -1550,9 +1543,8 @@ test_expect_success 'move detection ignoring whitespace at eol' '
1550
1543
EOF
1551
1544
test_cmp expected actual &&
1552
1545
1553
- git diff HEAD --no-renames --ignore-space-at-eol --color-moved --color |
1554
- grep -v "index" |
1555
- test_decode_color >actual &&
1546
+ git diff HEAD --no-renames --ignore-space-at-eol --color-moved --color >actual.raw &&
1547
+ grep -v "index" actual.raw | test_decode_color >actual &&
1556
1548
cat <<-\EOF >expected &&
1557
1549
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
1558
1550
<BOLD>--- a/lines.txt<RESET>
@@ -1597,9 +1589,8 @@ test_expect_success '--color-moved block at end of diff output respects MIN_ALNU
1597
1589
irrelevant_line
1598
1590
EOF
1599
1591
1600
- git diff HEAD --color-moved=zebra --color --no-renames |
1601
- grep -v "index" |
1602
- test_decode_color >actual &&
1592
+ git diff HEAD --color-moved=zebra --color --no-renames >actual.raw &&
1593
+ grep -v "index" actual.raw | test_decode_color >actual &&
1603
1594
cat >expected <<-\EOF &&
1604
1595
<BOLD>diff --git a/bar b/bar<RESET>
1605
1596
<BOLD>--- a/bar<RESET>
@@ -1636,9 +1627,8 @@ test_expect_success '--color-moved respects MIN_ALNUM_COUNT' '
1636
1627
nineteen chars 456789
1637
1628
EOF
1638
1629
1639
- git diff HEAD --color-moved=zebra --color --no-renames |
1640
- grep -v "index" |
1641
- test_decode_color >actual &&
1630
+ git diff HEAD --color-moved=zebra --color --no-renames >actual.raw &&
1631
+ grep -v "index" actual.raw | test_decode_color >actual &&
1642
1632
cat >expected <<-\EOF &&
1643
1633
<BOLD>diff --git a/bar b/bar<RESET>
1644
1634
<BOLD>--- a/bar<RESET>
0 commit comments