Skip to contentSkip to conversation

rebase --keep-empty -i: add test

PATCH In review Michael S. Tsirkin 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rebase --keep-empty -i: add test

There's some special code in rebase -i to deal
with --keep-empty.
Add test for this combination.

---
 t/t3404-rebase-interactive.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
t/t3404-rebase-interactive.sh +8 -0
index c0023a5..3b1b863 100755
@@ -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 &&
 	(
Signature · 1 line
MST
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Michael S. Tsirkin

There's some special code in rebase -i to deal
with --keep-empty.
Add test for this combination.

Quoted 26 lines
---
 t/t3404-rebase-interactive.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
t/t3404-rebase-interactive.sh +8 -0
index c0023a5..3b1b863 100755
@@ -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 &&
 	(
Signature · 1 line
MST