rebase --keep-empty -i: add test
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 18 May 2014 20:28:39 +0000 (23:28 +0300)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 May 2014 20:44:00 +0000 (13:44 -0700)
There's some special code in rebase -i to deal
with --keep-empty.
Add test for this combination.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3404-rebase-interactive.sh
index 50e22b1cadff4252dfb552a4db930f49544952aa..9848524aeea034fce797babe4dccb280b2ec2274 100755 (executable)
@@ -67,6 +67,14 @@ test_expect_success 'setup' '
 SHELL=
 export SHELL
 
+test_expect_success 'rebase --keep-empty' '
+       git checkout -b emptybranch master &&
+       git commit --allow-empty -m "empty" &&
+       git rebase --keep-empty -i HEAD~2 &&
+       git log --oneline >actual &&
+       test_line_count = 6 actual
+'
+
 test_expect_success 'rebase -i with the exec command' '
        git checkout master &&
        (