All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add test for git rebase --abort
Date: Sat, 01 Mar 2008 01:17:28 -0800	[thread overview]
Message-ID: <7vod9y4xcn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080301081511.GA30613@glandium.org> (Mike Hommey's message of "Sat, 1 Mar 2008 09:15:11 +0100")

Mike Hommey <mh@glandium.org> writes:

> On Sat, Mar 01, 2008 at 08:45:11AM +0100, Mike Hommey wrote:
>> On Sat, Mar 01, 2008 at 08:36:12AM +0100, Mike Hommey wrote:
>> > On Fri, Feb 29, 2008 at 03:26:01PM -0800, Junio C Hamano wrote:
>> > > Mike Hommey <mh@glandium.org> writes:
>> > > 
>> > > >  The failing test is the third. I don't have enough knowledge in git-rebase
>> > > >  to write an appropriate fix, but the problem seems to be in
>> > > >  move_to_original_branch, where testing head_name doesn't seem appropriate.
>> > > 
>> > > Please mark such an "expected to succeed but fails due to
>> > > suspected bug" with test_expect_failure.
>> > 
>> > I was kind of expecting the bug would be fixed before the test be
>> > included ;)
>> 
>> ... and the test actually passes with v1.5.0. I'll bisect.
>
> ... and I'm even the one to blame
> fb6e4e1f3f048898677f3cf177bfcaf60123bd5c is first bad commit

Heh, didn't you say you don't have enough knowledge in git-rebase? ;-)

I've applied the test with the following fixups.

 t/t3407-rebase-abort.sh |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index abdecc9..94bdd72 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -24,33 +24,33 @@ test_expect_success setup '
 '
 
 test_expect_success 'rebase --abort' '
-	! git rebase master &&
+	test_must_fail git rebase master &&
 	git rebase --abort &&
 	test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
 '
 
-# In case previous test failed
-git reset --hard pre-rebase >&3 2>&4
-rm -rf .dotest # Should be changed whenever rebase stop using .dotest
+test_expect_failure 'rebase --abort after --skip' '
+	# Clean up the state from the previous one
+	git reset --hard pre-rebase
+	rm -rf .dotest
 
-test_expect_success 'rebase --abort after --skip' '
-	! git rebase master &&
-	! git rebase --skip &&
+	test_must_fail git rebase master &&
+	test_must_fail git rebase --skip &&
 	test $(git rev-parse HEAD) = $(git rev-parse master) &&
-	sh -x ../../git-rebase --abort &&
+	git rebase --abort &&
 	test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
 '
 
-# In case previous test failed
-git reset --hard pre-rebase >&3 2>&4
-rm -rf .dotest # Should be changed whenever rebase stop using .dotest

  reply	other threads:[~2008-03-01  9:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 22:08 [PATCH] Add test for git rebase --abort Mike Hommey
2008-02-29 23:26 ` Junio C Hamano
2008-02-29 23:39   ` Johannes Schindelin
2008-03-01  7:36   ` Mike Hommey
2008-03-01  7:41     ` Junio C Hamano
2008-03-01  7:45     ` Mike Hommey
2008-03-01  8:15       ` Mike Hommey
2008-03-01  9:17         ` Junio C Hamano [this message]
2008-03-01 10:32           ` [PATCH] Fix git reset --abort not restoring the right commit under some conditions Mike Hommey
2008-03-01 11:11             ` Mike Hommey
2008-03-02  2:27             ` Junio C Hamano
2008-03-02  3:57               ` 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=7vod9y4xcn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.