Skip to content

Commit 21db12c

Browse files
committed
Merge branch 'dl/complete-cherry-pick-revert-skip'
The command line completion support (in contrib/) learned about the "--skip" option of "git revert" and "git cherry-pick". * dl/complete-cherry-pick-revert-skip: status: mention --skip for revert and cherry-pick completion: add --skip for cherry-pick and revert completion: merge options for cherry-pick and revert
2 parents d693345 + 86ae43d commit 21db12c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,9 @@ _git_checkout ()
13611361
esac
13621362
}
13631363

1364-
__git_cherry_pick_inprogress_options="--continue --quit --abort"
1364+
__git_sequencer_inprogress_options="--continue --quit --abort --skip"
1365+
1366+
__git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options
13651367

13661368
_git_cherry_pick ()
13671369
{
@@ -2624,7 +2626,7 @@ _git_restore ()
26242626
esac
26252627
}
26262628

2627-
__git_revert_inprogress_options="--continue --quit --abort"
2629+
__git_revert_inprogress_options=$__git_sequencer_inprogress_options
26282630

26292631
_git_revert ()
26302632
{

t/t7512-status-help.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '
733733
On branch cherry_branch
734734
You are currently cherry-picking commit $TO_CHERRY_PICK.
735735
(fix conflicts and run "git cherry-pick --continue")
736+
(use "git cherry-pick --skip" to skip this patch)
736737
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
737738
738739
Unmerged paths:
@@ -757,6 +758,7 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
757758
On branch cherry_branch
758759
You are currently cherry-picking commit $TO_CHERRY_PICK.
759760
(all conflicts fixed: run "git cherry-pick --continue")
761+
(use "git cherry-pick --skip" to skip this patch)
760762
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
761763
762764
Changes to be committed:
@@ -778,6 +780,7 @@ test_expect_success 'status when cherry-picking after committing conflict resolu
778780
On branch cherry_branch
779781
Cherry-pick currently in progress.
780782
(run "git cherry-pick --continue" to continue)
783+
(use "git cherry-pick --skip" to skip this patch)
781784
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
782785
783786
nothing to commit (use -u to show untracked files)
@@ -835,6 +838,7 @@ test_expect_success 'status while reverting commit (conflicts)' '
835838
On branch master
836839
You are currently reverting commit $TO_REVERT.
837840
(fix conflicts and run "git revert --continue")
841+
(use "git revert --skip" to skip this patch)
838842
(use "git revert --abort" to cancel the revert operation)
839843
840844
Unmerged paths:
@@ -855,6 +859,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' '
855859
On branch master
856860
You are currently reverting commit $TO_REVERT.
857861
(all conflicts fixed: run "git revert --continue")
862+
(use "git revert --skip" to skip this patch)
858863
(use "git revert --abort" to cancel the revert operation)
859864
860865
Changes to be committed:
@@ -887,6 +892,7 @@ test_expect_success 'status while reverting after committing conflict resolution
887892
On branch master
888893
Revert currently in progress.
889894
(run "git revert --continue" to continue)
895+
(use "git revert --skip" to skip this patch)
890896
(use "git revert --abort" to cancel the revert operation)
891897
892898
nothing to commit (use -u to show untracked files)

wt-status.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,8 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
14331433
else
14341434
status_printf_ln(s, color,
14351435
_(" (all conflicts fixed: run \"git cherry-pick --continue\")"));
1436+
status_printf_ln(s, color,
1437+
_(" (use \"git cherry-pick --skip\" to skip this patch)"));
14361438
status_printf_ln(s, color,
14371439
_(" (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"));
14381440
}
@@ -1460,6 +1462,8 @@ static void show_revert_in_progress(struct wt_status *s,
14601462
else
14611463
status_printf_ln(s, color,
14621464
_(" (all conflicts fixed: run \"git revert --continue\")"));
1465+
status_printf_ln(s, color,
1466+
_(" (use \"git revert --skip\" to skip this patch)"));
14631467
status_printf_ln(s, color,
14641468
_(" (use \"git revert --abort\" to cancel the revert operation)"));
14651469
}

0 commit comments

Comments
 (0)