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 <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
SZEDER Gábor 2010-10-10 23:39:34 +02:00 committed by Junio C Hamano
parent 8205ff8e99
commit 128191f5ee

View File

@ -907,7 +907,11 @@ _git_bisect ()
local subcommands="start bad good skip reset visualize replay log run"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
if [ -f "$(__gitdir)"/BISECT_START ]; then
__gitcomp "$subcommands"
else
__gitcomp "replay start"
fi
return
fi