Up to now the number printed was correct given that the current revision to test is bad. Moreover I think the number printed was always one to high, this is fixed, too. Signed-off-by: Uwe Kleine-König <ukleinek@xxxxxxxxxxxxxxxxxxxxxxxxxx> --- git-bisect.sh | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index b1c3a6b..a5b4fdd 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -150,8 +150,14 @@ bisect_next() { git-diff-tree --pretty $rev exit 0 fi - nr=$(eval "git-rev-list $rev $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit - echo "Bisecting: $nr revisions left to test after this" + nr_bad=$(eval "git-rev-list $rev^ $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit + nr_good=$(eval "git-rev-list $bad^ ^$rev $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit + if test "$nr_bad" -ge "$nr_good"; then + nr="$nr_bad"; + else + nr="$nr_good"; + fi; + echo "Bisecting: maximal $nr revisions left to test after this" echo "$rev" > "$GIT_DIR/refs/heads/new-bisect" git checkout -q new-bisect || exit mv "$GIT_DIR/refs/heads/new-bisect" "$GIT_DIR/refs/heads/bisect" && -- 1.5.0.2.260.g2eb065 -- Uwe Kleine-König http://www.google.com/search?q=Planck%27s+constant%3D - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html