summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-02-09 11:02:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-09 18:24:53 (GMT)
commite5f985187393180f072f0745c1f119fb1af128db (patch)
treef1110a8b158380b30e88d591c91e4c167f1737c0
parent39073104e2c2d1f700bc4c6d54424b81fab37eda (diff)
downloadgit-e5f985187393180f072f0745c1f119fb1af128db.zip
git-e5f985187393180f072f0745c1f119fb1af128db.tar.gz
git-e5f985187393180f072f0745c1f119fb1af128db.tar.bz2
completion: use __gitcomp_builtin in _git_revert
The new completable option is --gpg-sign In-progress options like --continue will be part of --git-completion-helper then filtered out by _git_revert() 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>
-rw-r--r--contrib/completion/git-completion.bash10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9aca05d..e63f2f2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2692,19 +2692,19 @@ _git_reset ()
__git_complete_refs
}
+__git_revert_inprogress_options="--continue --quit --abort"
+
_git_revert ()
{
__git_find_repo_path
if [ -f "$__git_repo_path"/REVERT_HEAD ]; then
- __gitcomp "--continue --quit --abort"
+ __gitcomp "$__git_revert_inprogress_options"
return
fi
case "$cur" in
--*)
- __gitcomp "
- --edit --mainline --no-edit --no-commit --signoff
- --strategy= --strategy-option=
- "
+ __gitcomp_builtin revert "--no-edit" \
+ "$__git_revert_inprogress_options"
return
;;
esac