summaryrefslogtreecommitdiff
path: root/t/t3424-rebase-empty.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3424-rebase-empty.sh')
-rwxr-xr-xt/t3424-rebase-empty.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/t3424-rebase-empty.sh b/t/t3424-rebase-empty.sh
index e1e3051..5e1045a 100755
--- a/t/t3424-rebase-empty.sh
+++ b/t/t3424-rebase-empty.sh
@@ -123,6 +123,42 @@ test_expect_success 'rebase --interactive uses default of --empty=ask' '
test_cmp expect actual
'
+test_expect_success 'rebase --merge --empty=drop --keep-empty' '
+ git checkout -B testing localmods &&
+ git rebase --merge --empty=drop --keep-empty upstream &&
+
+ test_write_lines D C B A >expect &&
+ git log --format=%s >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'rebase --merge --empty=drop --no-keep-empty' '
+ git checkout -B testing localmods &&
+ git rebase --merge --empty=drop --no-keep-empty upstream &&
+
+ test_write_lines C B A >expect &&
+ git log --format=%s >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'rebase --merge --empty=keep --keep-empty' '
+ git checkout -B testing localmods &&
+ git rebase --merge --empty=keep --keep-empty upstream &&
+
+ test_write_lines D C2 C B A >expect &&
+ git log --format=%s >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'rebase --merge --empty=keep --no-keep-empty' '
+ git checkout -B testing localmods &&
+ git rebase --merge --empty=keep --no-keep-empty upstream &&
+
+ test_write_lines C2 C B A >expect &&
+ git log --format=%s >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'rebase --merge does not leave state laying around' '
git checkout -B testing localmods~2 &&
git rebase --merge upstream &&