git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] Improve failure test for preserve merges

From
JSJörg Sommer <joerg@alea.gnuu.de>
Date
Mar 22, 2008, 21:44 UTC
Message-ID
<1206222266-29179-3-git-send-email-joerg@alea.gnuu.de>
In-Reply-To
<1206222266-29179-2-git-send-email-joerg@alea.gnuu.de>
Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
---
 t/t3404-rebase-interactive.sh |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 014b036..eaa2fc0 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -213,11 +213,13 @@ test_expect_success 'preserve merges with -p' '
 '
 
 test_expect_failure 'preserve merges with -p (case 2)' '
-	old_head=$(git rev-parse HEAD) &&
 	test_tick &&
-	EXPECT_COUNT=4 FAKE_LINES="1 4 3 edit 2" git rebase -i -p branch1 &&
-	git rebase --continue &&
-	test $(git rev-parse HEAD) != $old_head
+	EXPECT_COUNT=4 FAKE_LINES="1 4 3 edit 2" git rebase -i -v -p branch1 &&
+	git rebase --continue
+	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) = B &&
+	test $(git show HEAD~2:file1) = C
 '
 
 # clean-up from the above test
-- 
1.5.4.4
Previous: Jörg SommerNext: Jörg Sommer
Message 3 of 4 in “Add test for rebase interactive with preserve merges”
  1. 1/3 Add test for rebase interactive with preserve mergesJörg Sommer, Mar 22, 2008
  2. 2/3 Change rebase with preserver merges to pick up the right new HEADJörg Sommer, Mar 22, 2008
  3. 3/3 Improve failure test for preserve mergesJörg Sommer, Mar 22, 2008
  4. Jörg SommerMar 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.