File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 774
774
test_cmp expected actual
775
775
'
776
776
777
+ test_expect_success ' status when cherry-picking multiple commits' '
778
+ git reset --hard cherry_branch &&
779
+ test_when_finished "git cherry-pick --abort" &&
780
+ test_must_fail git cherry-pick cherry_branch_second one_cherry &&
781
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
782
+ cat >expected <<EOF &&
783
+ On branch cherry_branch
784
+ You are currently cherry-picking commit $TO_CHERRY_PICK.
785
+ (fix conflicts and run "git cherry-pick --continue")
786
+ (use "git cherry-pick --skip" to skip this patch)
787
+ (use "git cherry-pick --abort" to cancel the cherry-pick operation)
788
+
789
+ Unmerged paths:
790
+ (use "git add <file>..." to mark resolution)
791
+ both modified: main.txt
792
+
793
+ no changes added to commit (use "git add" and/or "git commit -a")
794
+ EOF
795
+ git status --untracked-files=no >actual &&
796
+ test_cmp expected actual
797
+ '
798
+
777
799
test_expect_success ' status when cherry-picking after committing conflict resolution' '
778
800
git reset --hard cherry_branch &&
779
801
test_when_finished "git cherry-pick --abort" &&
Original file line number Diff line number Diff line change @@ -1793,10 +1793,10 @@ void wt_status_get_state(struct repository *r,
1793
1793
oidcpy (& state -> revert_head_oid , & oid );
1794
1794
}
1795
1795
if (!sequencer_get_last_command (r , & action )) {
1796
- if (action == REPLAY_PICK ) {
1796
+ if (action == REPLAY_PICK && ! state -> cherry_pick_in_progress ) {
1797
1797
state -> cherry_pick_in_progress = 1 ;
1798
1798
oidcpy (& state -> cherry_pick_head_oid , null_oid ());
1799
- } else {
1799
+ } else if ( action == REPLAY_REVERT && ! state -> revert_in_progress ) {
1800
1800
state -> revert_in_progress = 1 ;
1801
1801
oidcpy (& state -> revert_head_oid , null_oid ());
1802
1802
}
You can’t perform that action at this time.
0 commit comments