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 774774 test_cmp expected actual
775775'
776776
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+
777799test_expect_success ' status when cherry-picking after committing conflict resolution' '
778800 git reset --hard cherry_branch &&
779801 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,
17931793 oidcpy (& state -> revert_head_oid , & oid );
17941794 }
17951795 if (!sequencer_get_last_command (r , & action )) {
1796- if (action == REPLAY_PICK ) {
1796+ if (action == REPLAY_PICK && ! state -> cherry_pick_in_progress ) {
17971797 state -> cherry_pick_in_progress = 1 ;
17981798 oidcpy (& state -> cherry_pick_head_oid , null_oid ());
1799- } else {
1799+ } else if ( action == REPLAY_REVERT && ! state -> revert_in_progress ) {
18001800 state -> revert_in_progress = 1 ;
18011801 oidcpy (& state -> revert_head_oid , null_oid ());
18021802 }
You can’t perform that action at this time.
0 commit comments