From deaa65a7545f2970167e32db3ff5f91b392f0517 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 27 Aug 2019 00:45:36 -0400 Subject: completion: merge options for cherry-pick and revert Since revert and cherry-pick share the same sequencer code, they should both accept the same command-line options. Derive the `__git_cherry_pick_inprogress_options` and `__git_revert_inprogress_options` variables from `__git_sequencer_inprogress_options` so that the options aren't unnecessarily duplicated twice. Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e087c4bf00..a7d3f58627 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1361,7 +1361,9 @@ _git_checkout () esac } -__git_cherry_pick_inprogress_options="--continue --quit --abort" +__git_sequencer_inprogress_options="--continue --quit --abort" + +__git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options _git_cherry_pick () { @@ -2512,7 +2514,7 @@ _git_restore () esac } -__git_revert_inprogress_options="--continue --quit --abort" +__git_revert_inprogress_options=$__git_sequencer_inprogress_options _git_revert () { -- cgit v1.2.3 From b1b16bba966b919c0ddb57338c5745ea8b288eb5 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 27 Aug 2019 00:45:39 -0400 Subject: completion: add --skip for cherry-pick and revert Even though `--skip` is a valid command-line option for cherry-pick and revert while they are in progress, it is not completed. Add this missing option to the completion script. Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a7d3f58627..b4651411b2 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1361,7 +1361,7 @@ _git_checkout () esac } -__git_sequencer_inprogress_options="--continue --quit --abort" +__git_sequencer_inprogress_options="--continue --quit --abort --skip" __git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options -- cgit v1.2.3