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 | bash: offer refs for 'git bisect start' (diff) | |
download | tgif-128191f5eec4365c4798d2bc8ef86008edb7d1bb.tar.xz |
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 |