@@ -820,8 +820,8 @@ test_expect_success 'format-patch --notes --signoff' '
820
820
'
821
821
822
822
test_expect_success ' format-patch notes output control' '
823
+ test_when_finished "git notes remove HEAD || :" &&
823
824
git notes add -m "notes config message" HEAD &&
824
- test_when_finished git notes remove HEAD &&
825
825
826
826
git format-patch -1 --stdout >out &&
827
827
! grep "notes config message" out &&
@@ -848,10 +848,10 @@ test_expect_success 'format-patch notes output control' '
848
848
'
849
849
850
850
test_expect_success ' format-patch with multiple notes refs' '
851
+ test_when_finished "git notes --ref note1 remove HEAD;
852
+ git notes --ref note2 remove HEAD || :" &&
851
853
git notes --ref note1 add -m "this is note 1" HEAD &&
852
- test_when_finished git notes --ref note1 remove HEAD &&
853
854
git notes --ref note2 add -m "this is note 2" HEAD &&
854
- test_when_finished git notes --ref note2 remove HEAD &&
855
855
856
856
git format-patch -1 --stdout >out &&
857
857
! grep "this is note 1" out &&
@@ -892,10 +892,10 @@ test_expect_success 'format-patch with multiple notes refs' '
892
892
test_expect_success ' format-patch with multiple notes refs in config' '
893
893
test_when_finished "test_unconfig format.notes" &&
894
894
895
+ test_when_finished "git notes --ref note1 remove HEAD;
896
+ git notes --ref note2 remove HEAD || :" &&
895
897
git notes --ref note1 add -m "this is note 1" HEAD &&
896
- test_when_finished git notes --ref note1 remove HEAD &&
897
898
git notes --ref note2 add -m "this is note 2" HEAD &&
898
- test_when_finished git notes --ref note2 remove HEAD &&
899
899
900
900
git config format.notes note1 &&
901
901
git format-patch -1 --stdout >out &&
@@ -2516,6 +2516,21 @@ test_expect_success 'range-diff: solo-patch' '
2516
2516
test_cmp expect actual
2517
2517
'
2518
2518
2519
+ test_expect_success ' interdiff: multi-patch, implicit --cover-letter' '
2520
+ test_when_finished "rm -f v23-0*.patch" &&
2521
+ git format-patch --interdiff=boop~2 -2 -v23 &&
2522
+ test_grep "^Interdiff against v22:$" v23-0000-cover-letter.patch &&
2523
+ test_cmp expect actual
2524
+ '
2525
+
2526
+ test_expect_success ' interdiff: explicit --no-cover-letter defeats implied --cover-letter' '
2527
+ test_when_finished "rm -f v23-0*.patch" &&
2528
+ test_must_fail git format-patch --no-cover-letter \
2529
+ --interdiff=boop~2 -2 -v23 &&
2530
+ test_must_fail git -c format.coverLetter=no format-patch \
2531
+ --interdiff=boop~2 -2 -v23
2532
+ '
2533
+
2519
2534
test_expect_success ' format-patch does not respect diff.noprefix' '
2520
2535
git -c diff.noprefix format-patch -1 --stdout >actual &&
2521
2536
grep "^--- a/blorp" actual
0 commit comments