From: "Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
To: git@vger.kernel.org
Subject: [PATCH] Bisect: fix calculation of the number of suspicious revisions
Date: Wed, 21 Mar 2007 22:04:54 +0100 [thread overview]
Message-ID: <20070321210454.GA2844@lala> (raw)
In-Reply-To: <20070317195840.GA20735@informatik.uni-freiburg.de>
Up to now the number printed was calculated assuming that the current revision
to test is bad. Given that it's not possible that this always matches the
number of suspicious revs if the current one is good, the maximum of both is
taken now.
Moreover I think the number printed was always one to high, this is fixed, too.
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
In the mail before I wrote that the former version of this patch was not
complete. This turned out to be a thinko. So now I only used a better
Subject, a more verbose log and a hopefully more clear output.
git-bisect.sh | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index b1c3a6b..aeff732 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: up to $nr suspicious revisions left after this test"
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.3
--
Uwe Kleine-König
http://www.google.com/search?q=1+hertz+in+sec**-1
next prev parent reply other threads:[~2007-03-21 21:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 16:14 [BUG] bisecting miscounts revisions left to test Uwe Kleine-König
2007-03-17 0:50 ` Johannes Schindelin
2007-03-17 13:46 ` Uwe Kleine-König
2007-03-17 14:12 ` [PATCH] calculate the maximal number of revisions " Uwe Kleine-König
2007-03-17 17:49 ` Johannes Schindelin
2007-03-17 19:58 ` Uwe Kleine-König
2007-03-21 21:04 ` Uwe Kleine-König [this message]
2007-03-21 21:23 ` [PATCH] Bisect: fix calculation of the number of suspicious revisions Junio C Hamano
2007-03-21 21:39 ` Uwe Kleine-König
2007-03-21 21:34 ` Uwe Kleine-König
2007-03-21 21:49 ` Junio C Hamano
2007-03-21 22:27 ` Linus Torvalds
2007-03-22 1:19 ` Junio C Hamano
2007-03-22 1:43 ` [PATCH] bisect: show the maximal number of commits to be tested Johannes Schindelin
2007-03-22 2:05 ` Junio C Hamano
2007-03-22 2:15 ` Johannes Schindelin
2007-03-22 6:36 ` [PATCH 1/2] git-rev-list: add --bisect-vars option Junio C Hamano
2007-03-22 6:42 ` [PATCH 2/2] git-rev-list --bisect: optimization Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070321210454.GA2844@lala \
--to=ukleinek@informatik.uni-freiburg.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).