From: Junio C Hamano Date: Thu, 4 Aug 2005 08:17:05 +0000 (-0700) Subject: git-bisect termination condition fix. X-Git-Tag: v0.99.4~36 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7f47e72fb3b947db4ffde56a40d999c2fe99ead2;p=git.git git-bisect termination condition fix. When I munged the original from Linus, which did not terminate when the last bisect to check happened to be a bad one, to terminate, I seem to have botched the end result to pick. Thanks for Sanjoy Mahajan for a good reproduction recipe to diagnose this. Signed-off-by: Junio C Hamano --- diff --git a/git-bisect-script b/git-bisect-script index 2233b414..29b25f4a 100755 --- 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"