@@ -626,9 +626,10 @@ test_expect_success 'prepare for cherry-pick conflicts' '
626
626
test_expect_success ' status when cherry-picking before resolving conflicts' '
627
627
test_when_finished "git cherry-pick --abort" &&
628
628
test_must_fail git cherry-pick cherry_branch_second &&
629
- cat >expected <<\EOF &&
629
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
630
+ cat >expected <<EOF &&
630
631
On branch cherry_branch
631
- You are currently cherry-picking.
632
+ You are currently cherry-picking commit $TO_CHERRY_PICK .
632
633
(fix conflicts and run "git cherry-pick --continue")
633
634
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
634
635
@@ -648,11 +649,12 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
648
649
git reset --hard cherry_branch &&
649
650
test_when_finished "git cherry-pick --abort" &&
650
651
test_must_fail git cherry-pick cherry_branch_second &&
652
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
651
653
echo end >main.txt &&
652
654
git add main.txt &&
653
- cat >expected <<\ EOF &&
655
+ cat >expected <<EOF &&
654
656
On branch cherry_branch
655
- You are currently cherry-picking.
657
+ You are currently cherry-picking commit $TO_CHERRY_PICK .
656
658
(all conflicts fixed: run "git cherry-pick --continue")
657
659
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
658
660
@@ -669,15 +671,15 @@ EOF
669
671
test_expect_success ' status showing detached at and from a tag' '
670
672
test_commit atag tagging &&
671
673
git checkout atag &&
672
- cat >expected <<\EOF
674
+ cat >expected <<\EOF &&
673
675
HEAD detached at atag
674
676
nothing to commit (use -u to show untracked files)
675
677
EOF
676
678
git status --untracked-files=no >actual &&
677
679
test_i18ncmp expected actual &&
678
680
679
681
git reset --hard HEAD^ &&
680
- cat >expected <<\EOF
682
+ cat >expected <<\EOF &&
681
683
HEAD detached from atag
682
684
nothing to commit (use -u to show untracked files)
683
685
EOF
@@ -695,7 +697,7 @@ test_expect_success 'status while reverting commit (conflicts)' '
695
697
test_commit new to-revert.txt &&
696
698
TO_REVERT=$(git rev-parse --short HEAD^) &&
697
699
test_must_fail git revert $TO_REVERT &&
698
- cat >expected <<EOF
700
+ cat >expected <<EOF &&
699
701
On branch master
700
702
You are currently reverting commit $TO_REVERT.
701
703
(fix conflicts and run "git revert --continue")
716
718
test_expect_success ' status while reverting commit (conflicts resolved)' '
717
719
echo reverted >to-revert.txt &&
718
720
git add to-revert.txt &&
719
- cat >expected <<EOF
721
+ cat >expected <<EOF &&
720
722
On branch master
721
723
You are currently reverting commit $TO_REVERT.
722
724
(all conflicts fixed: run "git revert --continue")
735
737
736
738
test_expect_success ' status after reverting commit' '
737
739
git revert --continue &&
738
- cat >expected <<\EOF
740
+ cat >expected <<\EOF &&
739
741
On branch master
740
742
nothing to commit (use -u to show untracked files)
741
743
EOF
0 commit comments