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>
Nguyễn Thái Ngọc Duy committed
Feb 9, 2018 at 18:02 UTC
e5f985187393180f072f0745c1f119fb1af128db
1 file changed
+5
-5
contrib/completion/git-completion.bash
+5
-5
@@ -2692,19 +2692,19 @@ _git_reset ()
2692
__git_complete_refs
2693
}
2694
2695
+__git_revert_inprogress_options="--continue --quit --abort"
2696
+
2697
_git_revert ()
2698
{
2699
__git_find_repo_path
2700
if [ -f "$__git_repo_path"/REVERT_HEAD ]; then
2699
- __gitcomp "--continue --quit --abort"
2701
+ __gitcomp "$__git_revert_inprogress_options"
2702
return
2703
fi
2704
case "$cur" in
2705
--*)
2704
- __gitcomp "
2705
- --edit --mainline --no-edit --no-commit --signoff
2706
- --strategy= --strategy-option=
2707
- "
2706
+ __gitcomp_builtin revert "--no-edit" \
2707
+ "$__git_revert_inprogress_options"
2708
return
2709
;;
2710
esac