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

BUG: sequencer.c:795: root commit without message -- when rewording root commit

From
Todd Zullinger <tmz@pobox.com>
Date
Jun 15, 2018, 04:31 UTC
Message-ID
<20180615043111.GS3094@zaya.teonanacatl.net>
Hi Johannes,

I was splitting a repository tonight and ran 'rebase -i --root' to reword the initial commit. Then git died with 'BUG: sequencer.c:795: root commit without message.'

A simple test case to show the failure:
-- >8 --
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 59c766540..bc5e228b8 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -971,6 +971,14 @@ test_expect_success 'rebase -i --root fixup root commit' '
 	test 0 = $(git cat-file commit HEAD | grep -c ^parent\ )
 '
 
+test_expect_success 'rebase -i --root reword root commit' '
+	test_when_finished "test_might_fail git rebase --abort" &&
+	git checkout -b reword-root-branch master &&
+	set_fake_editor &&
+	FAKE_LINES="reword 1 2" FAKE_COMMIT_MESSAGE="A changed" git rebase -i --root &&
+	git show HEAD^ | grep "A changed"
+'
+
 test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '
 	git reset --hard &&
 	git checkout conflict-branch &&
-- >8 --

Not surprisingly (among the commits which changed between
2.17.1 and 2.18.0-rc2, at least), git bisect points to
21d0764c82 ("rebase -i --root: let the sequencer handle even
the initial part", 2018-05-04).  With luck, the fix will be
obvious to trained eyes and can be added before 2.18.0. :)

Thanks,
-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All decent people live beyond their incomes nowadays, and those who
aren't respectable live beyond other peoples'.
    -- Saki
Message 1 of 1 in “BUG: sequencer.c:795: root commit without message -- when rewording root commit”
  1. Todd ZullingerJun 15, 2018

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.