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>
Phillip Wood committed
Jun 19, 2017 at 18:56 UTC
1ceb9dfab7eab719ade6dc2d7e3d53b50139da1d
1 file changed
+7
t/t3404-rebase-interactive.sh
+7
@@ -169,6 +169,13 @@ test_expect_success 'reflog for the branch shows state before rebase' '
169
test $(git rev-parse branch1@{1}) = $(git rev-parse original-branch1)
170
'
171
172
+test_expect_success 'reflog for the branch shows correct finish message' '
173
+ printf "rebase -i (finish): refs/heads/branch1 onto %s\n" \
174
+ "$(git rev-parse branch2)" >expected &&
175
+ git log -g --pretty=%gs -1 refs/heads/branch1 >actual &&
176
+ test_cmp expected actual
177
+'
178
+
179
test_expect_success 'exchange two commits' '
180
set_fake_editor &&
181
FAKE_LINES="2 1" git rebase -i HEAD~2 &&