git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rebase --keep-empty -i: add test

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
May 18, 2014, 20:28 UTC
Message-ID
<1400444838-12685-1-git-send-email-mst@redhat.com>

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>
---
 t/t3404-rebase-interactive.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index c0023a5..3b1b863 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -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 &&
 	(
-- 
MST
Next: Neil Horman
Message 1 of 2 in “rebase --keep-empty -i: add test”
  1. rebase --keep-empty -i: add testMichael S. Tsirkin, May 18, 2014
  2. Neil HormanMay 18, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.