git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Bisect: Improve error message in "bisect_next_check".

From
Christian Couder <chriscool@tuxfamily.org>
Date
Mar 28, 2007, 03:19 UTC
Message-ID
<20070328051953.82456ba6.chriscool@tuxfamily.org>
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 ?
 git-bisect.sh |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 57d6754..47f0b8b 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -123,7 +123,12 @@ 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.'
+	    USE_START=''
+	    test -d "$GIT_DIR/refs/bisect" ||
+	        USE_START='start by "git bisect start" and then'
+	    echo >&2 'You need to' $USE_START\
+		'give me at least one good and one bad revisions' \
+		'by "git bisect good" and "git bisect bad".'
 	    exit 1 ;;
 	*)
 	    true ;;
@@ -223,12 +228,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
Message 1 of 1 in “Bisect: Improve error message in "bisect_next_check".”
  1. Bisect: Improve error message in "bisect_next_check".Christian Couder, Mar 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.