t3427: fix erroneous assumption
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 31 Jul 2019 15:18:45 +0000 (08:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 31 Jul 2019 19:24:07 +0000 (12:24 -0700)
Apart from the `setup` test case, `t3427-rebase-subtree.sh` is made up
exclusively of demonstrations of breakages. The tricky thing about such
demonstrations is that they are often buggy themselves.

In this instance, somewhere over the course of the six iterations
of the patch that eventually made it into Git's `master` as 5f35900849e
(contrib/subtree: Add a test for subtree rebase that loses commits,
2016-06-28), the commit message "files_subtree/master4" was changed to
just "master4", but the test cases still expected the old commit
message.

Let's fix this, at long last.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3427-rebase-subtree.sh
index b21925d279aaad3f59cb61c97da959876d36e596..94cc532e108798691f1ec57db77733f0d92d0ff6 100755 (executable)
@@ -68,7 +68,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit'
        reset_rebase &&
        git checkout -b rebase-preserve-merges to-rebase &&
        git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
-       verbose test "$(commit_message HEAD~)" = "files_subtree/master4" &&
+       verbose test "$(commit_message HEAD~)" = "master4" &&
        verbose test "$(commit_message HEAD)" = "files_subtree/master5"
 '
 
@@ -77,7 +77,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --
        reset_rebase &&
        git checkout -b rebase-keep-empty to-rebase &&
        git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
-       verbose test "$(commit_message HEAD~2)" = "files_subtree/master4" &&
+       verbose test "$(commit_message HEAD~2)" = "master4" &&
        verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
        verbose test "$(commit_message HEAD)" = "Empty commit"
 '
@@ -87,7 +87,7 @@ test_expect_failure 'Rebase -Xsubtree --onto commit' '
        reset_rebase &&
        git checkout -b rebase-onto to-rebase &&
        git rebase -Xsubtree=files_subtree --onto files-master master &&
-       verbose test "$(commit_message HEAD~2)" = "files_subtree/master4" &&
+       verbose test "$(commit_message HEAD~2)" = "master4" &&
        verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
        verbose test "$(commit_message HEAD)" = "Empty commit"
 '