completion: bisect: complete bad, new, old, and help subcommands

The bad, new, old and help subcommands to git-bisect(1) are not
completed.

Add the bad, new, old, and help subcommands to the appropriate lists
such that the commands and their possible ref arguments are completed.
Add tests.

Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Britton Leo Kerin
2024-02-06 12:50:43 -09:00
committed by Junio C Hamano
parent db489ea4f3
commit e1f74dd58b
2 changed files with 73 additions and 2 deletions

View File

@ -1449,7 +1449,7 @@ _git_bisect ()
{
__git_has_doubledash && return
local subcommands="start bad good skip reset visualize replay log run"
local subcommands="start bad new good old skip reset visualize replay log run help"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__git_find_repo_path
@ -1462,7 +1462,7 @@ _git_bisect ()
fi
case "$subcommand" in
bad|good|reset|skip|start)
bad|new|good|old|reset|skip|start)
__git_complete_refs
;;
*)