Skip to content

Commit e5f9851

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3907310 commit e5f9851

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contrib/completion/git-completion.bash

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,19 +2692,19 @@ _git_reset ()
26922692
__git_complete_refs
26932693
}
26942694

2695+
__git_revert_inprogress_options="--continue --quit --abort"
2696+
26952697
_git_revert ()
26962698
{
26972699
__git_find_repo_path
26982700
if [ -f "$__git_repo_path"/REVERT_HEAD ]; then
2699-
__gitcomp "--continue --quit --abort"
2701+
__gitcomp "$__git_revert_inprogress_options"
27002702
return
27012703
fi
27022704
case "$cur" in
27032705
--*)
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"
27082708
return
27092709
;;
27102710
esac

0 commit comments

Comments
 (0)