diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2010-10-10 23:39:34 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-10-13 15:08:59 -0700 |
commit | 128191f5eec4365c4798d2bc8ef86008edb7d1bb (patch) | |
tree | 71e4dc7c190354dbad299273f95019a5238f3094 /contrib/completion | |
parent | 8205ff8e9957039d508b5702e3b45fc9c4a55648 (diff) | |
download | git-128191f5eec4365c4798d2bc8ef86008edb7d1bb.tar.gz |
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>
Diffstat (limited to 'contrib/completion')
-rwxr-xr-x | contrib/completion/git-completion.bash | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5e023d415b..d739113153 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 |