@@ -1209,32 +1209,32 @@ append_signoff()
1209
1209
1210
1210
test_expect_success ' signoff: commit with no body' '
1211
1211
append_signoff </dev/null >actual &&
1212
- cat <<\EOF | sed "s/EOL$//" >expected &&
1212
+ cat <<\EOF | sed "s/EOL$//" >expect &&
1213
1213
4:Subject: [PATCH] EOL
1214
1214
8:
1215
1215
9:Signed-off-by: C O Mitter <[email protected] >
1216
1216
EOF
1217
- test_cmp expected actual
1217
+ test_cmp expect actual
1218
1218
'
1219
1219
1220
1220
test_expect_success ' signoff: commit with only subject' '
1221
1221
echo subject | append_signoff >actual &&
1222
- cat >expected <<\EOF &&
1222
+ cat >expect <<\EOF &&
1223
1223
4:Subject: [PATCH] subject
1224
1224
8:
1225
1225
9:Signed-off-by: C O Mitter <[email protected] >
1226
1226
EOF
1227
- test_cmp expected actual
1227
+ test_cmp expect actual
1228
1228
'
1229
1229
1230
1230
test_expect_success ' signoff: commit with only subject that does not end with NL' '
1231
1231
printf subject | append_signoff >actual &&
1232
- cat >expected <<\EOF &&
1232
+ cat >expect <<\EOF &&
1233
1233
4:Subject: [PATCH] subject
1234
1234
8:
1235
1235
9:Signed-off-by: C O Mitter <[email protected] >
1236
1236
EOF
1237
- test_cmp expected actual
1237
+ test_cmp expect actual
1238
1238
'
1239
1239
1240
1240
test_expect_success ' signoff: no existing signoffs' '
@@ -1243,24 +1243,24 @@ subject
1243
1243
1244
1244
body
1245
1245
EOF
1246
- cat >expected <<\EOF &&
1246
+ cat >expect <<\EOF &&
1247
1247
4:Subject: [PATCH] subject
1248
1248
8:
1249
1249
10:
1250
1250
11:Signed-off-by: C O Mitter <[email protected] >
1251
1251
EOF
1252
- test_cmp expected actual
1252
+ test_cmp expect actual
1253
1253
'
1254
1254
1255
1255
test_expect_success ' signoff: no existing signoffs and no trailing NL' '
1256
1256
printf "subject\n\nbody" | append_signoff >actual &&
1257
- cat >expected <<\EOF &&
1257
+ cat >expect <<\EOF &&
1258
1258
4:Subject: [PATCH] subject
1259
1259
8:
1260
1260
10:
1261
1261
11:Signed-off-by: C O Mitter <[email protected] >
1262
1262
EOF
1263
- test_cmp expected actual
1263
+ test_cmp expect actual
1264
1264
'
1265
1265
1266
1266
test_expect_success ' signoff: some random signoff' '
@@ -1271,14 +1271,14 @@ body
1271
1271
1272
1272
Signed-off-by: my@house
1273
1273
EOF
1274
- cat >expected <<\EOF &&
1274
+ cat >expect <<\EOF &&
1275
1275
4:Subject: [PATCH] subject
1276
1276
8:
1277
1277
10:
1278
1278
11:Signed-off-by: my@house
1279
1279
12:Signed-off-by: C O Mitter <[email protected] >
1280
1280
EOF
1281
- test_cmp expected actual
1281
+ test_cmp expect actual
1282
1282
'
1283
1283
1284
1284
test_expect_success ' signoff: misc conforming footer elements' '
@@ -1292,14 +1292,14 @@ Signed-off-by: my@house
1292
1292
Tested-by: Some One <[email protected] >
1293
1293
Bug: 1234
1294
1294
EOF
1295
- cat >expected <<\EOF &&
1295
+ cat >expect <<\EOF &&
1296
1296
4:Subject: [PATCH] subject
1297
1297
8:
1298
1298
10:
1299
1299
11:Signed-off-by: my@house
1300
1300
15:Signed-off-by: C O Mitter <[email protected] >
1301
1301
EOF
1302
- test_cmp expected actual
1302
+ test_cmp expect actual
1303
1303
'
1304
1304
1305
1305
test_expect_success ' signoff: some random signoff-alike' '
@@ -1309,13 +1309,13 @@ subject
1309
1309
body
1310
1310
Fooled-by-me: my@house
1311
1311
EOF
1312
- cat >expected <<\EOF &&
1312
+ cat >expect <<\EOF &&
1313
1313
4:Subject: [PATCH] subject
1314
1314
8:
1315
1315
11:
1316
1316
12:Signed-off-by: C O Mitter <[email protected] >
1317
1317
EOF
1318
- test_cmp expected actual
1318
+ test_cmp expect actual
1319
1319
'
1320
1320
1321
1321
test_expect_success ' signoff: not really a signoff' '
@@ -1324,14 +1324,14 @@ subject
1324
1324
1325
1325
I want to mention about Signed-off-by: here.
1326
1326
EOF
1327
- cat >expected <<\EOF &&
1327
+ cat >expect <<\EOF &&
1328
1328
4:Subject: [PATCH] subject
1329
1329
8:
1330
1330
9:I want to mention about Signed-off-by: here.
1331
1331
10:
1332
1332
11:Signed-off-by: C O Mitter <[email protected] >
1333
1333
EOF
1334
- test_cmp expected actual
1334
+ test_cmp expect actual
1335
1335
'
1336
1336
1337
1337
test_expect_success ' signoff: not really a signoff (2)' '
@@ -1341,13 +1341,13 @@ subject
1341
1341
My unfortunate
1342
1342
Signed-off-by: example happens to be wrapped here.
1343
1343
EOF
1344
- cat >expected <<\EOF &&
1344
+ cat >expect <<\EOF &&
1345
1345
4:Subject: [PATCH] subject
1346
1346
8:
1347
1347
10:Signed-off-by: example happens to be wrapped here.
1348
1348
11:Signed-off-by: C O Mitter <[email protected] >
1349
1349
EOF
1350
- test_cmp expected actual
1350
+ test_cmp expect actual
1351
1351
'
1352
1352
1353
1353
test_expect_success ' signoff: valid S-o-b paragraph in the middle' '
@@ -1359,7 +1359,7 @@ Signed-off-by: your@house
1359
1359
1360
1360
A lot of houses.
1361
1361
EOF
1362
- cat >expected <<\EOF &&
1362
+ cat >expect <<\EOF &&
1363
1363
4:Subject: [PATCH] subject
1364
1364
8:
1365
1365
9:Signed-off-by: my@house
@@ -1368,7 +1368,7 @@ EOF
1368
1368
13:
1369
1369
14:Signed-off-by: C O Mitter <[email protected] >
1370
1370
EOF
1371
- test_cmp expected actual
1371
+ test_cmp expect actual
1372
1372
'
1373
1373
1374
1374
test_expect_success ' signoff: the same signoff at the end' '
@@ -1379,24 +1379,24 @@ body
1379
1379
1380
1380
Signed-off-by: C O Mitter <[email protected] >
1381
1381
EOF
1382
- cat >expected <<\EOF &&
1382
+ cat >expect <<\EOF &&
1383
1383
4:Subject: [PATCH] subject
1384
1384
8:
1385
1385
10:
1386
1386
11:Signed-off-by: C O Mitter <[email protected] >
1387
1387
EOF
1388
- test_cmp expected actual
1388
+ test_cmp expect actual
1389
1389
'
1390
1390
1391
1391
test_expect_success ' signoff: the same signoff at the end, no trailing NL' '
1392
1392
printf "subject\n\nSigned-off-by: C O Mitter <[email protected] >" |
1393
1393
append_signoff >actual &&
1394
- cat >expected <<\EOF &&
1394
+ cat >expect <<\EOF &&
1395
1395
4:Subject: [PATCH] subject
1396
1396
8:
1397
1397
9:Signed-off-by: C O Mitter <[email protected] >
1398
1398
EOF
1399
- test_cmp expected actual
1399
+ test_cmp expect actual
1400
1400
'
1401
1401
1402
1402
test_expect_success ' signoff: the same signoff NOT at the end' '
@@ -1408,14 +1408,14 @@ body
1408
1408
Signed-off-by: C O Mitter <[email protected] >
1409
1409
Signed-off-by: my@house
1410
1410
EOF
1411
- cat >expected <<\EOF &&
1411
+ cat >expect <<\EOF &&
1412
1412
4:Subject: [PATCH] subject
1413
1413
8:
1414
1414
10:
1415
1415
11:Signed-off-by: C O Mitter <[email protected] >
1416
1416
12:Signed-off-by: my@house
1417
1417
EOF
1418
- test_cmp expected actual
1418
+ test_cmp expect actual
1419
1419
'
1420
1420
1421
1421
test_expect_success ' signoff: tolerate garbage in conforming footer' '
@@ -1428,13 +1428,13 @@ Tested-by: my@house
1428
1428
Some Trash
1429
1429
Signed-off-by: C O Mitter <[email protected] >
1430
1430
EOF
1431
- cat >expected <<\EOF &&
1431
+ cat >expect <<\EOF &&
1432
1432
4:Subject: [PATCH] subject
1433
1433
8:
1434
1434
10:
1435
1435
13:Signed-off-by: C O Mitter <[email protected] >
1436
1436
EOF
1437
- test_cmp expected actual
1437
+ test_cmp expect actual
1438
1438
'
1439
1439
1440
1440
test_expect_success ' signoff: respect trailer config' '
@@ -1444,13 +1444,13 @@ subject
1444
1444
Myfooter: x
1445
1445
Some Trash
1446
1446
EOF
1447
- cat >expected <<\EOF &&
1447
+ cat >expect <<\EOF &&
1448
1448
4:Subject: [PATCH] subject
1449
1449
8:
1450
1450
11:
1451
1451
12:Signed-off-by: C O Mitter <[email protected] >
1452
1452
EOF
1453
- test_cmp expected actual &&
1453
+ test_cmp expect actual &&
1454
1454
1455
1455
test_config trailer.Myfooter.ifexists add &&
1456
1456
append_signoff <<\EOF >actual &&
@@ -1459,12 +1459,12 @@ subject
1459
1459
Myfooter: x
1460
1460
Some Trash
1461
1461
EOF
1462
- cat >expected <<\EOF &&
1462
+ cat >expect <<\EOF &&
1463
1463
4:Subject: [PATCH] subject
1464
1464
8:
1465
1465
11:Signed-off-by: C O Mitter <[email protected] >
1466
1466
EOF
1467
- test_cmp expected actual
1467
+ test_cmp expect actual
1468
1468
'
1469
1469
1470
1470
test_expect_success ' signoff: footer begins with non-signoff without @ sign' '
@@ -1479,13 +1479,13 @@ Change-id: Ideadbeef
1479
1479
Signed-off-by: C O Mitter <[email protected] >
1480
1480
Bug: 1234
1481
1481
EOF
1482
- cat >expected <<\EOF &&
1482
+ cat >expect <<\EOF &&
1483
1483
4:Subject: [PATCH] subject
1484
1484
8:
1485
1485
10:
1486
1486
14:Signed-off-by: C O Mitter <[email protected] >
1487
1487
EOF
1488
- test_cmp expected actual
1488
+ test_cmp expect actual
1489
1489
'
1490
1490
1491
1491
test_expect_success ' format patch ignores color.ui' '
@@ -1604,13 +1604,13 @@ test_expect_success 'format-patch --base' '
1604
1604
git checkout patchid &&
1605
1605
git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 &&
1606
1606
git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 &&
1607
- echo >expected &&
1608
- echo "base-commit: $(git rev-parse HEAD~3)" >>expected &&
1609
- echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expected &&
1610
- echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expected &&
1611
- signature >> expected &&
1612
- test_cmp expected actual1 &&
1613
- test_cmp expected actual2 &&
1607
+ echo >expect &&
1608
+ echo "base-commit: $(git rev-parse HEAD~3)" >>expect &&
1609
+ echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1610
+ echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1611
+ signature >> expect &&
1612
+ test_cmp expect actual1 &&
1613
+ test_cmp expect actual2 &&
1614
1614
echo >fail &&
1615
1615
echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
1616
1616
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
@@ -1625,8 +1625,8 @@ test_expect_success 'format-patch --base errors out when base commit is in revis
1625
1625
test_must_fail git format-patch --base=HEAD~1 -2 &&
1626
1626
git format-patch --stdout --base=HEAD~2 -2 >patch &&
1627
1627
grep "^base-commit:" patch >actual &&
1628
- echo "base-commit: $(git rev-parse HEAD~2)" >expected &&
1629
- test_cmp expected actual
1628
+ echo "base-commit: $(git rev-parse HEAD~2)" >expect &&
1629
+ test_cmp expect actual
1630
1630
'
1631
1631
1632
1632
test_expect_success ' format-patch --base errors out when base commit is not ancestor of revision list' '
@@ -1652,8 +1652,8 @@ test_expect_success 'format-patch --base errors out when base commit is not ance
1652
1652
test_must_fail git format-patch --base=$(cat commit-id-Z) -3 &&
1653
1653
git format-patch --stdout --base=$(cat commit-id-base) -3 >patch &&
1654
1654
grep "^base-commit:" patch >actual &&
1655
- echo "base-commit: $(cat commit-id-base)" >expected &&
1656
- test_cmp expected actual
1655
+ echo "base-commit: $(cat commit-id-base)" >expect &&
1656
+ test_cmp expect actual
1657
1657
'
1658
1658
1659
1659
test_expect_success ' format-patch --base=auto' '
@@ -1664,8 +1664,8 @@ test_expect_success 'format-patch --base=auto' '
1664
1664
test_commit N2 &&
1665
1665
git format-patch --stdout --base=auto -2 >patch &&
1666
1666
grep "^base-commit:" patch >actual &&
1667
- echo "base-commit: $(git rev-parse upstream)" >expected &&
1668
- test_cmp expected actual
1667
+ echo "base-commit: $(git rev-parse upstream)" >expect &&
1668
+ test_cmp expect actual
1669
1669
'
1670
1670
1671
1671
test_expect_success ' format-patch errors out when history involves criss-cross' '
@@ -1701,17 +1701,17 @@ test_expect_success 'format-patch format.useAutoBaseoption' '
1701
1701
git config format.useAutoBase true &&
1702
1702
git format-patch --stdout -1 >patch &&
1703
1703
grep "^base-commit:" patch >actual &&
1704
- echo "base-commit: $(git rev-parse upstream)" >expected &&
1705
- test_cmp expected actual
1704
+ echo "base-commit: $(git rev-parse upstream)" >expect &&
1705
+ test_cmp expect actual
1706
1706
'
1707
1707
1708
1708
test_expect_success ' format-patch --base overrides format.useAutoBase' '
1709
1709
test_when_finished "git config --unset format.useAutoBase" &&
1710
1710
git config format.useAutoBase true &&
1711
1711
git format-patch --stdout --base=HEAD~1 -1 >patch &&
1712
1712
grep "^base-commit:" patch >actual &&
1713
- echo "base-commit: $(git rev-parse HEAD~1)" >expected &&
1714
- test_cmp expected actual
1713
+ echo "base-commit: $(git rev-parse HEAD~1)" >expect &&
1714
+ test_cmp expect actual
1715
1715
'
1716
1716
1717
1717
test_expect_success ' format-patch --base with --attach' '
0 commit comments