{"thread":{"id":"30565","subject":"[PATCH] t3404: begin \"exchange commits with -p\" test with correct preconditions","startedAt":"2012-05-19T13:14:16Z","lastAt":"2012-05-19T22:15:43Z","messageCount":2,"participants":["Johannes Sixt","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"191735","messageId":"4FB79CA8.7080103@kdbg.org","threadId":"30565","inReplyTo":null,"subject":"[PATCH] t3404: begin \"exchange commits with -p\" test with correct preconditions","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2012-05-19T13:14:16Z","receivedAt":"2012-05-19T13:14:16Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"The test case shows a bug in 'rebase -p', but even if the bug were fixed\nthe test would fail because it did not ensure that the preconditions match\nthe postconditions that were checked. Insert the suitable 'git checkout'.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n Could it be that this bug existed since the test case was introduced\n in cddb42d2?\n\n (The bug in git-rebase has not been fixed since then, unfortunately.)\n\n -- Hannes\n\n t/t3404-rebase-interactive.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 4983bd7..025c1c6 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -247,6 +247,7 @@ test_expect_success '-p handles \"no changes\" gracefully' '\n '\n \n test_expect_failure 'exchange two commits with -p' '\n+\tgit checkout H &&\n \tFAKE_LINES=\"2 1\" git rebase -i -p HEAD~2 &&\n \ttest H = $(git cat-file commit HEAD^ | sed -ne \\$p) &&\n \ttest G = $(git cat-file commit HEAD | sed -ne \\$p)\n-- \n1.7.10.2.529.g0c18cfd\n"},{"id":"191744","messageId":"20120519221543.GE4567@burratino","threadId":"30565","inReplyTo":"4FB79CA8.7080103@kdbg.org","subject":"Re: [PATCH] t3404: begin \"exchange commits with -p\" test with correct preconditions","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-19T22:15:43Z","receivedAt":"2012-05-19T22:15:43Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Johannes Sixt wrote:\n\n> The test case shows a bug in 'rebase -p', but even if the bug were fixed\n> the test would fail because it did not ensure that the preconditions match\n> the postconditions that were checked. Insert the suitable 'git checkout'.\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  Could it be that this bug existed since the test case was introduced\n>  in cddb42d2?\n\nYeah, looks like it was always broken.  I remember sanity checking\nby removing the \"-p\", too, but that was probably before moving the\ntest to join the other -p tests.  Thanks for fixing it.\n\nAcked-by: Jonathan Nieder <jrnieder@gmail.com>\n"}]}