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

[PATCH] Improve git bisect error message

From
AKAndi Kleen <andi@firstfloor.org>
Date
Apr 26, 2008, 13:39 UTC
Message-ID
<20080426133937.GA27677@basil.nowhere.org>

It took me some time to figure out what this error message meant and how to fix the problem. So let's improve it a little.

-Andi

--- git-1.5.4/git-bisect~ 2008-02-09 13:37:16.000000000 +0100 +++ git-1.5.4/git-bisect 2008-04-26 01:26:19.000000000 +0200

@@ -71,7 +71,10 @@
 		git checkout $branch || exit
 		;;
 	refs/heads/*)
-		[ -s "$GIT_DIR/head-name" ] && die "won't bisect on seeked tree"
+		if [ -s "$GIT_DIR/head-name" ] ; then
+			echo >&2 "Please run git bisect reset"
+			die "won't bisect on seeked tree"
+		fi
 		echo "${head#refs/heads/}" >"$GIT_DIR/head-name"
 		;;
 	*)
Next: Christian Couder
Message 1 of 2 in “Improve git bisect error message”
  1. Improve git bisect error messageAndi Kleen, Apr 26, 2008
  2. Christian CouderApr 26, 2008

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.