From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: git@vger.kernel.org
Cc: "Jörg Sommer" <joerg@alea.gnuu.de>
Subject: [PATCH] New test for preserve merges and squash
Date: Thu, 20 Mar 2008 01:03:52 +0100 [thread overview]
Message-ID: <1205971432-12641-1-git-send-email-joerg@alea.gnuu.de> (raw)
Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
---
t/t3404-rebase-interactive.sh | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
The current version of git fails this test. I think it's a bug, because
the patch is what I expect to happen. Or am I wrong?
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 62e65d7..05f3828 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -213,6 +213,26 @@ test_expect_success 'preserve merges with -p' '
test $(git show HEAD~2:file1) = B
'
+# This test uses to-be-preserved from the test 'preserve merges with -p'
+test_expect_success 'squash and preserve merges' '
+ test_tick &&
+ git checkout -b squash-and-preserve-merges master &&
+ echo A > file1 &&
+ git commit -m SaPM-1 file1 &&
+ echo B > file1 &&
+ git commit -m SaPM-2 file1 &&
+ git merge to-be-preserved &&
+ echo C > file1 &&
+ git commit -m SaPM-3 file1 &&
+
+ EXPECT_COUNT=4 FAKE_LINES="1 2 squash 4 3" \
+ git rebase -i -p --onto branch1 master &&
+ test $(git rev-parse HEAD^2) = $(git rev-parse to-be-preserved) &&
+ test $(git rev-parse HEAD~3) = $(git rev-parse branch1) &&
+ test $(git show HEAD:file1) = C &&
+ test $(git show HEAD~2:file1) = A
+'
+
test_expect_success '--continue tries to commit' '
test_tick &&
! git rebase -i --onto new-branch1 HEAD^ &&
--
1.5.4.4
next reply other threads:[~2008-03-20 0:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 0:03 Jörg Sommer [this message]
2008-03-20 0:28 ` [PATCH] New test for preserve merges and squash Junio C Hamano
2008-03-20 10:18 ` Jörg Sommer
2008-03-20 11:09 ` Johannes Schindelin
2008-03-20 13:01 ` [PATCH] New test for rebase with " Jörg Sommer
2008-03-20 23:46 ` Johannes Schindelin
2008-03-21 12:56 ` Why rebase with preserve merges asks for merged commits Jörg Sommer
2008-03-21 13:14 ` Johannes Schindelin
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=1205971432-12641-1-git-send-email-joerg@alea.gnuu.de \
--to=joerg@alea.gnuu.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).