Skip to content

Commit 128191f

Browse files
szedergitster
authored andcommitted
bash: not all 'git bisect' subcommands make sense when not bisecting
... but only 'start' and 'replay'. The other commands will either error out or offer to start bisecting for the user. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8205ff8 commit 128191f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,11 @@ _git_bisect ()
907907
local subcommands="start bad good skip reset visualize replay log run"
908908
local subcommand="$(__git_find_on_cmdline "$subcommands")"
909909
if [ -z "$subcommand" ]; then
910-
__gitcomp "$subcommands"
910+
if [ -f "$(__gitdir)"/BISECT_START ]; then
911+
__gitcomp "$subcommands"
912+
else
913+
__gitcomp "replay start"
914+
fi
911915
return
912916
fi
913917

0 commit comments

Comments
 (0)