git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: [RFC/PATCH 1/3] t6030: show "rev-list --bisect" breakage when bisecting
Date: Wed, 04 Nov 2009 05:00:01 +0100	[thread overview]
Message-ID: <20091104040004.4545.36317.chriscool@tuxfamily.org> (raw)
In-Reply-To: <20091104034312.4545.2176.chriscool@tuxfamily.org>

In the following commits:

ad3f9a7 Add '--bisect' revision machinery argument
81ee52b Merge branch 'lt/revision-bisect' into next

the '--bisect' argument was added to the revision machinery to easily
use the "bad" and "good" refs from the current bisection in any
command that expect some refs.

The problem was that '--bisect' already had a special meaning for
"git rev-list" outside the revision machinery and now it was eaten by
the revision machinery. So a flag named "bisect" was added to
"struct rev_info" in these commits, so that "git rev-list" outside the
revision machinery could see that "--bisect" had been used and operate
as if "--bisect" had been passed to it.

But the above does not fix everything, and this commit adds a test
case to show that.

Now "git rev-list --bisect BAD --not GOOD" behaves differently
depending on whether we are currently bisecting or not. If we are not
currently bisecting, it uses "BAD --not GOOD" as the bisect refs and
if we are bisecting it uses the bisect refs of the current bisection
as the bisect refs. This means that we don't behave like we used to
when we are bisecting and the reafs passed on the command line to
"git rev-list --bisect" are different from the bisect refs of the
current bisection.

The following commit will fix this regression.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 t/t6030-bisect-porcelain.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index def397c..88a2877 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -392,6 +392,19 @@ test_expect_success 'bisect does not create a "bisect" branch' '
 	git branch -D bisect
 '
 
+test_expect_failure 'bisect and "rev-list --bisect"' '
+	rev_list2=$(git rev-list --bisect $HASH3 --not $HASH1) &&
+	test "$rev_list2" = "$HASH2" &&
+	rev_list4=$(git rev-list --bisect $HASH7 --not $HASH1) &&
+	test "$rev_list4" = "$HASH4" &&
+	git bisect start $HASH7 $HASH1 &&
+	rev_hash4=$(git rev-parse --verify HEAD) &&
+	test "$rev_hash4" = "$HASH4" &&
+	rev_list2=$(git rev-list --bisect $HASH3 --not $HASH1) &&
+	test "$rev_list2" = "$HASH2" &&
+	git bisect reset
+'
+
 # This creates a "side" branch to test "siblings" cases.
 #
 # H1-H2-H3-H4-H5-H6-H7  <--other
-- 
1.6.5.1.gaf97d

  reply	other threads:[~2009-11-04  3:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  4:00 [RFC/PATCH 0/3] use '--bisect-refs' as bisect rev machinery option Christian Couder
2009-11-04  4:00 ` Christian Couder [this message]
2009-11-04  4:00 ` [RFC/PATCH 2/3] revision: change '--bisect' rev machinery argument to 'bisect-refs' Christian Couder
2009-11-04  4:00 ` [RFC/PATCH 3/3] bisect: simplify calling visualizer using '--bisect-refs' Christian Couder
2009-11-04 18:25 ` [RFC/PATCH 0/3] use '--bisect-refs' as bisect rev machinery option Junio C Hamano
2009-11-04 18:32   ` Linus Torvalds
2009-11-04 18:35     ` Linus Torvalds
2009-11-04 19:22       ` Junio C Hamano
2009-11-04 21:26         ` Christian Couder
2009-11-04 21:52           ` Junio C Hamano
2009-11-05  5:22             ` Christian Couder

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=20091104040004.4545.36317.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@linux-foundation.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).