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: Improve error message in "bisect_next_check".
Date: Thu, 29 Mar 2007 09:42:35 +0200	[thread overview]
Message-ID: <20070329094235.816d15e9.chriscool@tuxfamily.org> (raw)

So we can remove the specific message in "bisect_run".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---

Junio C Hamano wrote:

> Doesn't that suggest the existing messages from "git bisect good/bad"
> can use the same improvement you added only to "bisect run"?

You mean something like this patch ?
(It does not print a long message any more.)


 git-bisect.sh |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 57d6754..7fcdc74 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -123,7 +123,15 @@ bisect_next_check() {
 	case "$next_ok,$1" in
 	no,) false ;;
 	no,fail)
-	    echo >&2 'You need to give me at least one good and one bad revisions.'
+	    ALSO=''
+	    test -d "$GIT_DIR/refs/bisect" || {
+		echo >&2 'You need to start by "git bisect start".'
+		ALSO='also '
+	    }
+	    echo >&2 'You '$ALSO'need to give me at least one good' \
+		'and one bad revisions.'
+	    echo >&2 '(You can use "git bisect bad" and' \
+		'"git bisect good" for that.)'
 	    exit 1 ;;
 	*)
 	    true ;;
@@ -223,12 +231,6 @@ 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
-- 
1.5.1.rc2.15.g465b3-dirty

             reply	other threads:[~2007-03-29  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29  7:42 Christian Couder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-28  3:19 [PATCH] Bisect: Improve error message in "bisect_next_check" 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=20070329094235.816d15e9.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).