t3404: check root commit in 'rebase -i --root reword root commit'
When testing a reworded root commit, ensure that the squash-onto commit which is created and amended is still the root commit. Suggested-by: Phillip Wood <phillip.wood@talktalk.net> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger committed
Jun 18, 2018 at 18:19 UTC
878810552b42a444b2a38ccaad60d23969638f05
1 file changed
+2
-1
t/t3404-rebase-interactive.sh
+2
-1
@@ -977,7 +977,8 @@ test_expect_success 'rebase -i --root reword root commit' '
977
set_fake_editor &&
978
FAKE_LINES="reword 1 2" FAKE_COMMIT_MESSAGE="A changed" \
979
git rebase -i --root &&
980
- git show HEAD^ | grep "A changed"
980
+ git show HEAD^ | grep "A changed" &&
981
+ test -z "$(git show -s --format=%p HEAD^)"
982
'
983
984
test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '