git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] t3404: begin "exchange commits with -p" test with correct preconditions
@ 2012-05-19 13:14 Johannes Sixt
  2012-05-19 22:15 ` Jonathan Nieder
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Sixt @ 2012-05-19 13:14 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Git Mailing List

The test case shows a bug in 'rebase -p', but even if the bug were fixed
the test would fail because it did not ensure that the preconditions match
the postconditions that were checked. Insert the suitable 'git checkout'.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Could it be that this bug existed since the test case was introduced
 in cddb42d2?

 (The bug in git-rebase has not been fixed since then, unfortunately.)

 -- Hannes

 t/t3404-rebase-interactive.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 4983bd7..025c1c6 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -247,6 +247,7 @@ test_expect_success '-p handles "no changes" gracefully' '
 '
 
 test_expect_failure 'exchange two commits with -p' '
+	git checkout H &&
 	FAKE_LINES="2 1" git rebase -i -p HEAD~2 &&
 	test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
 	test G = $(git cat-file commit HEAD | sed -ne \$p)
-- 
1.7.10.2.529.g0c18cfd

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-19 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-19 13:14 [PATCH] t3404: begin "exchange commits with -p" test with correct preconditions Johannes Sixt
2012-05-19 22:15 ` Jonathan Nieder

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).