]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase -i: add test for reflog message
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 19 Jun 2017 17:56:03 +0000 (18:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Jun 2017 18:19:00 +0000 (11:19 -0700)
Check that the reflog message written to the branch reflog when the
rebase is completed is correct

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3404-rebase-interactive.sh

index 33d392ba112e2c130a02d2229967842ca257e837..5403b4ba01b908230b67bb0a46d7073f4e99bd10 100755 (executable)
@@ -169,6 +169,13 @@ test_expect_success 'reflog for the branch shows state before rebase' '
        test $(git rev-parse branch1@{1}) = $(git rev-parse original-branch1)
 '
 
+test_expect_success 'reflog for the branch shows correct finish message' '
+       printf "rebase -i (finish): refs/heads/branch1 onto %s\n" \
+               "$(git rev-parse branch2)" >expected &&
+       git log -g --pretty=%gs -1 refs/heads/branch1 >actual &&
+       test_cmp expected actual
+'
+
 test_expect_success 'exchange two commits' '
        set_fake_editor &&
        FAKE_LINES="2 1" git rebase -i HEAD~2 &&