From 128191f5eec4365c4798d2bc8ef86008edb7d1bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?SZEDER=20G=C3=A1bor?= Date: Sun, 10 Oct 2010 23:39:34 +0200 Subject: [PATCH] bash: not all 'git bisect' subcommands make sense when not bisecting MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... 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 Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5e023d415..d73911315 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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 -- 2.26.2