summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-06-19 17:56:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-19 18:19:00 (GMT)
commit1ceb9dfab7eab719ade6dc2d7e3d53b50139da1d (patch)
treeb2bda56a5d3609b32bf12c29ddd73e71c88bb529 /t/t3404-rebase-interactive.sh
parentcdb866b30bd862527de597ae9c7fe7540de55bf2 (diff)
downloadgit-1ceb9dfab7eab719ade6dc2d7e3d53b50139da1d.zip
git-1ceb9dfab7eab719ade6dc2d7e3d53b50139da1d.tar.gz
git-1ceb9dfab7eab719ade6dc2d7e3d53b50139da1d.tar.bz2
rebase -i: add test for reflog message
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>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 33d392b..5403b4b 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -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 &&