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

Re: bisect gives strange answer

From
Junio C Hamano <junkio@cox.net>
Date
Aug 4, 2005, 06:57 UTC
Message-ID
<7v8xzi42bm.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<E1E0XjN-000102-Un@approximate.corpus.cam.ac.uk>
Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> writes:
Show 20 quoted lines
> + git bisect bad
> Bisecting: 2 revisions left to test after this
> + cat .git/HEAD
> b4634484815e1879512a23e4f59eef648135c30a
> + git bisect bad
> b4634484815e1879512a23e4f59eef648135c30a is first bad commit
> diff-tree b4634484815e1879512a23e4f59eef648135c30a (from 3d3c2ae1101c1f2dff7e2f9d514769779dbd2737)
> The answer makes no sense since my .config doesn't use the bt87x driver
> (the TP600X uses a snd-cs46xx).  To be sure, I checked the diff with
>
>   git diff 3d3c2ae1101c1f2dff7e2f9d514769779dbd2737..b4634484815e1879512a23e4f59eef648135c30a
>
> The commit changed only sound/pci/bt87x.c
>
> I do believe this line at the end of the bisection:
>
>   b4634484815e1879512a23e4f59eef648135c30a is first bad commit
>...
> I suspect that bisect jumped the gun at the end, and that there are a
> few more revisions to test.

Thank you for a very useful reproduction recipe. I think this is my bug. Could you try this please?

------------
diff --git a/git-bisect-script b/git-bisect-script
--- a/git-bisect-script
+++ b/git-bisect-script
@@ -107,8 +107,8 @@ bisect_next() {
 	rev=$(eval "git-rev-list --bisect $good $bad") || exit
 	nr=$(eval "git-rev-list $rev $good" | wc -l) || exit
 	if [ "$nr" -le "1" ]; then
-	    echo "$bad is first bad commit"
-	    git-diff-tree --pretty $bad
+	    echo "$rev is first bad commit"
+	    git-diff-tree --pretty $rev
 	    exit 0
 	fi
 	echo "Bisecting: $nr revisions left to test after this"
Previous: Sanjoy MahajanNext: Sanjoy Mahajan
Message 2 of 11 in “bisect gives strange answer”
  1. Sanjoy MahajanAug 4, 2005
  2. Junio C HamanoAug 4, 2005
  3. Sanjoy MahajanAug 4, 2005
  4. Greg KHAug 4, 2005
  5. Sanjoy MahajanAug 4, 2005
  6. Dave JonesAug 4, 2005
  7. Sanjoy MahajanAug 4, 2005
  8. Junio C HamanoAug 4, 2005
  9. Sam RavnborgAug 4, 2005
  10. Sanjoy MahajanAug 5, 2005
  11. Junio C HamanoAug 7, 2005

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.