@matheusbsbs / matheus-bagliano / commits / 128191f5ee
Fork 0

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>

SZEDER Gábor committed Oct 10, 2010 at 23:39 UTC 128191f5eec4365c4798d2bc8ef86008edb7d1bb
1 file changed +5 -1
contrib/completion/git-completion.bash
+5 -1
@@ -907,7 +907,11 @@ _git_bisect ()
907 local subcommands="start bad good skip reset visualize replay log run"
908 local subcommand="$(__git_find_on_cmdline "$subcommands")"
909 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
915 return
916 fi
917