git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Bisect: add checks at the beginning of "git bisect run".
Date: Tue, 27 Mar 2007 06:49:57 +0200	[thread overview]
Message-ID: <20070327064957.34dad72a.chriscool@tuxfamily.org> (raw)

We may be able to "run" with only one good revision given
and then verify that the result of the first run is bad.
And perhaps also the other way around.

But for now let's check that we have at least one bad and
one good revision before we start to run.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index fda1712..57d6754 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -223,6 +223,14 @@ bisect_replay () {
 }
 
 bisect_run () {
+    # Check that we have everything to run correctly.
+    test -d "$GIT_DIR/refs/bisect" || {
+	echo >&2 'You need to start by "git bisect start".'
+	echo >&2 'And then by "git bisect bad" and "git bisect good".'
+	exit 1
+    }
+    bisect_next_check fail
+
     while true
     do
       echo "running $@"
-- 
1.5.1.rc2.2.gcc08

             reply	other threads:[~2007-03-27  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27  4:49 Christian Couder [this message]
2007-03-27  5:28 ` [PATCH] Bisect: add checks at the beginning of "git bisect run" Junio C Hamano
2007-03-27  7:15   ` Christian Couder
2007-03-27  7:22     ` Junio C Hamano
2007-03-27  5:46 ` Junio C Hamano
2007-03-28  3:44   ` Christian Couder
2007-03-28  5:46     ` Junio C Hamano
2007-03-28  7:52       ` Christian Couder
2007-03-28  7:57         ` Junio C Hamano
2007-03-29  5:02           ` Christian Couder
2007-03-29  6:06             ` Junio C Hamano
2007-04-05  8:01               ` Christian Couder
2007-04-05  8:05                 ` Christian Couder

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=20070327064957.34dad72a.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).