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

Re* [PATCH v2] bisect: fix bad rev checking in "git bisect good"

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 12, 2008, 09:17 UTC
Message-ID
<7vd4ovjutr.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080412090335.e92d3da3.chriscool@tuxfamily.org>

I've applied your earlier one to maint and propagated it all the way up, and pushed the results out for tonight. I'll apply the following as a follow-up patch later on top of what I've already pushed out, which is the difference between the one applied and your v2.

-- >8 -- bisect: report bad rev better

The previous one overwrote the variable used to report the bad input when the input is actually bad, and we did not give a useful enough information. This corrects it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index c8be9f7..c99ffee 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -155,9 +155,9 @@ bisect_state() {
 		shift
 		for rev in "$@"
 		do
-			rev=$(git rev-parse --verify "$rev^{commit}") ||
+			sha=$(git rev-parse --verify "$rev^{commit}") ||
 				die "Bad rev input: $rev"
-			bisect_write "$state" "$rev"
+			bisect_write "$state" "$sha"
 		done ;;
 	*,bad)
 		die "'git bisect bad' can take only one argument." ;;
Previous: Christian Couder
Message 2 of 2 in “bisect: fix bad rev checking in "git bisect good"”
  1. bisect: fix bad rev checking in "git bisect good"Christian Couder, Apr 12, 2008
  2. Re* [PATCH v2] bisect: fix bad rev checking in "git bisect good"Junio C Hamano, Apr 12, 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.