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