From: "SZEDER Gábor" <szeder@ira.uka.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: "Junio C Hamano" <gitster@pobox.com>,
git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>
Subject: [PATCH 2/2] bash: not all 'git bisect' subcommands make sense when not bisecting
Date: Sun, 10 Oct 2010 23:39:34 +0200 [thread overview]
Message-ID: <1286746774-7877-2-git-send-email-szeder@ira.uka.de> (raw)
In-Reply-To: <1286746774-7877-1-git-send-email-szeder@ira.uka.de>
... 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>
---
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 eb8ef47..1262f72 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
--
1.7.3.1.148.g2fffa
next prev parent reply other threads:[~2010-10-10 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 21:39 [PATCH 1/2] bash: offer refs for 'git bisect start' SZEDER Gábor
2010-10-10 21:39 ` SZEDER Gábor [this message]
2010-10-10 22:05 ` [PATCH 2/2] bash: not all 'git bisect' subcommands make sense when not bisecting Sverre Rabbelier
2010-10-10 22:12 ` SZEDER Gábor
2010-10-10 22:14 ` Sverre Rabbelier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286746774-7877-2-git-send-email-szeder@ira.uka.de \
--to=szeder@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).