summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-09 18:01:49 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-02-09 10:24:50 -0800
commit660003e29acae9a5283ad8881a524a2b329336e3 (patch)
tree86d0a0bae91db80953496025e4080557e746b201 /contrib
parentcompletion: use __gitcomp_builtin in _git_checkout (diff)
downloadtgif-660003e29acae9a5283ad8881a524a2b329336e3.tar.xz
completion: use __gitcomp_builtin in _git_cherry_pick
The new completable options are: --allow-empty --allow-empty-message --ff --gpg-sign --keep-redundant-commits --strategy-option In-progress options like --continue will be part of --git-completion-helper then filtered out by _git_cherry_pick() unless the operation is in progress. This helps keep marking of these operations in just one place. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7e312f95e9..068def9f6b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1283,16 +1283,19 @@ _git_cherry ()
__git_complete_refs
}
+__git_cherry_pick_inprogress_options="--continue --quit --abort"
+
_git_cherry_pick ()
{
__git_find_repo_path
if [ -f "$__git_repo_path"/CHERRY_PICK_HEAD ]; then
- __gitcomp "--continue --quit --abort"
+ __gitcomp "$__git_cherry_pick_inprogress_options"
return
fi
case "$cur" in
--*)
- __gitcomp "--edit --no-commit --signoff --strategy= --mainline"
+ __gitcomp_builtin cherry-pick "" \
+ "$__git_cherry_pick_inprogress_options"
;;
*)
__git_complete_refs