Re: [PATCH] Add test for git rebase --abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Hommey <mh@xxxxxxxxxxxx> 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@xxxxxxxxxxxx> 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
-
 test_expect_success 'rebase --abort after --continue' '
-	! git rebase master &&
+	# Clean up the state from the previous one
+	git reset --hard pre-rebase
+	rm -rf .dotest
+
+	test_must_fail git rebase master &&
 	echo c > a &&
 	echo d >> a &&
 	git add a &&
-	! git rebase --continue &&
+	test_must_fail git rebase --continue &&
 	test $(git rev-parse HEAD) != $(git rev-parse master) &&
 	git rebase --abort &&
 	test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux