{"thread":{"id":"48722","subject":"[PATCH 0/2] rebase --root: fix `reword` on a root commit","startedAt":"2018-06-16T19:26:22Z","lastAt":"2018-06-20T11:05:00Z","messageCount":17,"participants":["Johannes Schindelin via GitGitGadget","Todd Zullinger","Phillip Wood","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"350329","messageId":"pull.3.git.gitgitgadget@gmail.com","threadId":"48722","inReplyTo":null,"subject":"[PATCH 0/2] rebase --root: fix `reword` on a root commit","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-06-16T19:26:16Z","receivedAt":"2018-06-16T19:26:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: GitGitGadget <gitgitgadget@gmail.com>\n\nTodd Zullinger reported this bug in https://public-inbox.org/git/20180615043111.GS3094@zaya.teonanacatl.net/: when calling git rebase --root and trying to reword the root commit's message, a BUG is reported.\n\nThis fixes that.\n\nIMO the bug fix is trivial enough to qualify for inclusion into v2.18.0, still.\n\nJohannes Schindelin (1):\n  rebase --root: fix amending root commit messages\n\nTodd Zullinger (1):\n  rebase --root: demonstrate a bug while amending root commit messages\n\n sequencer.c                   | 2 +-\n t/t3404-rebase-interactive.sh | 9 +++++++++\n 2 files changed, 10 insertions(+), 1 deletion(-)\n\n\nbase-commit: 68372c88794aba15f853542008cda39def768372\n-- \n2.17.0.windows.1\n"},{"id":"350330","messageId":"d59805a43ddaf4bbd4528a2b7afa9809eca9b86b.1529177176.git.gitgitgadget@gmail.com","threadId":"48722","inReplyTo":"pull.3.git.gitgitgadget@gmail.com","subject":"[PATCH 1/2] rebase --root: demonstrate a bug while amending root commit messages","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-06-15T04:31:11Z","receivedAt":"2018-06-16T19:26:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Todd Zullinger <tmz@pobox.com>\n\nWhen splitting a repository, running `git rebase -i --root` to reword\nthe initial commit, Git dies with\n\n\tBUG: sequencer.c:795: root commit without message.\n\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3404-rebase-interactive.sh | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex c65826dda..ca94c688d 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -971,6 +971,15 @@ test_expect_success 'rebase -i --root fixup root commit' '\n \ttest 0 = $(git cat-file commit HEAD | grep -c ^parent\\ )\n '\n \n+test_expect_failure 'rebase -i --root reword root commit' '\n+\ttest_when_finished \"test_might_fail git rebase --abort\" &&\n+\tgit checkout -b reword-root-branch master &&\n+\tset_fake_editor &&\n+\tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n+\tgit rebase -i --root &&\n+\tgit show HEAD^ | grep \"A changed\"\n+'\n+\n test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '\n \tgit reset --hard &&\n \tgit checkout conflict-branch &&\n-- \n2.17.0.windows.1\n\n"},{"id":"350331","messageId":"6f492ded5c4b9ee82501433d5a5227bc3e546c31.1529177176.git.gitgitgadget@gmail.com","threadId":"48722","inReplyTo":"pull.3.git.gitgitgadget@gmail.com","subject":"[PATCH 2/2] rebase --root: fix amending root commit messages","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-06-16T19:00:38Z","receivedAt":"2018-06-16T19:26:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe code path that triggered that \"BUG\" really does not want to run\nwithout an explicit commit message. In the case where we want to amend a\ncommit message, we have an *implicit* commit message, though: the one of\nthe commit to amend. Therefore, this code path should not even be\nentered.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n sequencer.c                   | 2 +-\n t/t3404-rebase-interactive.sh | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/sequencer.c b/sequencer.c\nindex cca968043..4034c0461 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -784,7 +784,7 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,\n \tstruct child_process cmd = CHILD_PROCESS_INIT;\n \tconst char *value;\n \n-\tif (flags & CREATE_ROOT_COMMIT) {\n+\tif ((flags & CREATE_ROOT_COMMIT) && !(flags & AMEND_MSG)) {\n \t\tstruct strbuf msg = STRBUF_INIT, script = STRBUF_INIT;\n \t\tconst char *author = is_rebase_i(opts) ?\n \t\t\tread_author_ident(&script) : NULL;\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex ca94c688d..e500d7c32 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -971,7 +971,7 @@ test_expect_success 'rebase -i --root fixup root commit' '\n \ttest 0 = $(git cat-file commit HEAD | grep -c ^parent\\ )\n '\n \n-test_expect_failure 'rebase -i --root reword root commit' '\n+test_expect_success 'rebase -i --root reword root commit' '\n \ttest_when_finished \"test_might_fail git rebase --abort\" &&\n \tgit checkout -b reword-root-branch master &&\n \tset_fake_editor &&\n-- \n2.17.0.windows.1\n"},{"id":"350332","messageId":"20180616201143.GH11827@zaya.teonanacatl.net","threadId":"48722","inReplyTo":"pull.3.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] rebase --root: fix `reword` on a root commit","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-06-16T20:11:43Z","receivedAt":"2018-06-16T20:11:49Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi Johannes,\n\nJohannes Schindelin via GitGitGadget wrote:\n> From: GitGitGadget <gitgitgadget@gmail.com>\n> \n> Todd Zullinger reported this bug in\n> https://public-inbox.org/git/20180615043111.GS3094@zaya.teonanacatl.net/:\n> when calling git rebase --root and trying to reword the\n> root commit's message, a BUG is reported.\n>\n> This fixes that.\n> \n> IMO the bug fix is trivial enough to qualify for inclusion into v2.18.0, still.\n\nIt does indeed fix the issue.  I agree it would be nice to\nsee it in 2.18.0.  As a fix for a minor regression\nintroduced in this cycle, that seems reasonable.\n\n> Johannes Schindelin (1):\n>   rebase --root: fix amending root commit messages\n> \n> Todd Zullinger (1):\n>   rebase --root: demonstrate a bug while amending root commit messages\n> \n>  sequencer.c                   | 2 +-\n>  t/t3404-rebase-interactive.sh | 9 +++++++++\n>  2 files changed, 10 insertions(+), 1 deletion(-)\n> \n> \n> base-commit: 68372c88794aba15f853542008cda39def768372\n\n-- \nTodd\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nI don't mean to sound cold, or cruel, or vicious,\nbut I am, so that's the way it comes out.\n    -- Bill Hicks\n\n"},{"id":"350374","messageId":"484fe825-0726-a027-1187-de00df6406d5@talktalk.net","threadId":"48722","inReplyTo":"d59805a43ddaf4bbd4528a2b7afa9809eca9b86b.1529177176.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/2] rebase --root: demonstrate a bug while amending rootcommit messages","fromName":"Phillip Wood","fromEmail":"phillip.wood@talktalk.net","sentAt":"2018-06-18T10:25:12Z","receivedAt":"2018-06-18T10:25:18Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Todd/Johannes\n\nOn 15/06/18 05:31, Johannes Schindelin via GitGitGadget wrote:\n> \n> From: Todd Zullinger <tmz@pobox.com>\n> \n> When splitting a repository, running `git rebase -i --root` to reword\n> the initial commit, Git dies with\n> \n> \tBUG: sequencer.c:795: root commit without message.\n> \n> Signed-off-by: Todd Zullinger <tmz@pobox.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t3404-rebase-interactive.sh | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n> \n> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\n> index c65826dda..ca94c688d 100755\n> --- a/t/t3404-rebase-interactive.sh\n> +++ b/t/t3404-rebase-interactive.sh\n> @@ -971,6 +971,15 @@ test_expect_success 'rebase -i --root fixup root commit' '\n>  \ttest 0 = $(git cat-file commit HEAD | grep -c ^parent\\ )\n>  '\n>  \n> +test_expect_failure 'rebase -i --root reword root commit' '\n> +\ttest_when_finished \"test_might_fail git rebase --abort\" &&\n> +\tgit checkout -b reword-root-branch master &&\n> +\tset_fake_editor &&\n> +\tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n> +\tgit rebase -i --root &&\n> +\tgit show HEAD^ | grep \"A changed\"\n\nI wonder if it should also check that HEAD^ is the root commit, to make\nsure that the squash-onto commit that's created and then amended has\nbeen squashed onto.\n\nBest Wishes\n\nPhillip\n\n> +'\n> +\n>  test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '\n>  \tgit reset --hard &&\n>  \tgit checkout conflict-branch &&\n> \n\n"},{"id":"350394","messageId":"xmqqd0woxdz9.fsf@gitster-ct.c.googlers.com","threadId":"48722","inReplyTo":"20180616201143.GH11827@zaya.teonanacatl.net","subject":"Re: [PATCH 0/2] rebase --root: fix `reword` on a root commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-06-18T16:21:14Z","receivedAt":"2018-06-18T16:21:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n> Hi Johannes,\n>\n> Johannes Schindelin via GitGitGadget wrote:\n>> From: GitGitGadget <gitgitgadget@gmail.com>\n>> \n>> Todd Zullinger reported this bug in\n>> https://public-inbox.org/git/20180615043111.GS3094@zaya.teonanacatl.net/:\n>> when calling git rebase --root and trying to reword the\n>> root commit's message, a BUG is reported.\n>>\n>> This fixes that.\n>> \n>> IMO the bug fix is trivial enough to qualify for inclusion into v2.18.0, still.\n>\n> It does indeed fix the issue.  I agree it would be nice to\n> see it in 2.18.0.  As a fix for a minor regression\n> introduced in this cycle, that seems reasonable.\n\nOffhand it is not clear from the proposed log message where the\noriginal breakage happened, but if this is to fix a regression\nbetween v2.17.0 and v2.18.0, then let's have it.  As -rc2 slipped\nfor a few days, it is reasonable to delay the final by a couple of\ndays as well, if only to give the last minute fixes and translators\nreasonable time to breathe.\n\nThanks.\n\n\n>\n>> Johannes Schindelin (1):\n>>   rebase --root: fix amending root commit messages\n>> \n>> Todd Zullinger (1):\n>>   rebase --root: demonstrate a bug while amending root commit messages\n>> \n>>  sequencer.c                   | 2 +-\n>>  t/t3404-rebase-interactive.sh | 9 +++++++++\n>>  2 files changed, 10 insertions(+), 1 deletion(-)\n>> \n>> \n>> base-commit: 68372c88794aba15f853542008cda39def768372\n"},{"id":"350396","messageId":"20180618164140.GN11827@zaya.teonanacatl.net","threadId":"48722","inReplyTo":"xmqqd0woxdz9.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/2] rebase --root: fix `reword` on a root commit","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-06-18T16:41:40Z","receivedAt":"2018-06-18T16:41:48Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi,\n\nJunio C Hamano wrote:\n> Todd Zullinger <tmz@pobox.com> writes:\n> \n>> Hi Johannes,\n>>\n>> Johannes Schindelin via GitGitGadget wrote:\n>>> From: GitGitGadget <gitgitgadget@gmail.com>\n>>> \n>>> Todd Zullinger reported this bug in\n>>> https://public-inbox.org/git/20180615043111.GS3094@zaya.teonanacatl.net/:\n>>> when calling git rebase --root and trying to reword the\n>>> root commit's message, a BUG is reported.\n>>>\n>>> This fixes that.\n>>> \n>>> IMO the bug fix is trivial enough to qualify for inclusion into v2.18.0, still.\n>>\n>> It does indeed fix the issue.  I agree it would be nice to\n>> see it in 2.18.0.  As a fix for a minor regression\n>> introduced in this cycle, that seems reasonable.\n> \n> Offhand it is not clear from the proposed log message where the\n> original breakage happened, but if this is to fix a regression\n> between v2.17.0 and v2.18.0, then let's have it.  As -rc2 slipped\n> for a few days, it is reasonable to delay the final by a couple of\n> days as well, if only to give the last minute fixes and translators\n> reasonable time to breathe.\n\nPerhaps replacing the first paragraph with this would make\nit clearer?\n\n    Since 21d0764c82 (\"rebase -i --root: let the sequencer handle even the\n    initial part\", 2018-05-04), when splitting a repository, running `git\n    rebase -i --root` to reword the initial commit, Git dies with\n\nAlternately, a similar note could be added at the end.\n\n    This regression was recently introduced in 21d0764c82 (\"rebase -i \n    --root: let the sequencer handle even the initial part\", 2018-05-04).\n\n-- \nTodd\n"},{"id":"350398","messageId":"20180618164958.GO11827@zaya.teonanacatl.net","threadId":"48722","inReplyTo":"484fe825-0726-a027-1187-de00df6406d5@talktalk.net","subject":"Re: [PATCH 1/2] rebase --root: demonstrate a bug while amending rootcommit messages","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-06-18T16:49:58Z","receivedAt":"2018-06-18T16:50:04Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi Phillip,\n\nPhillip Wood wrote:\n> On 15/06/18 05:31, Johannes Schindelin via GitGitGadget wrote:\n>> \n>> From: Todd Zullinger <tmz@pobox.com>\n>>  \n>> +test_expect_failure 'rebase -i --root reword root commit' '\n>> +\ttest_when_finished \"test_might_fail git rebase --abort\" &&\n>> +\tgit checkout -b reword-root-branch master &&\n>> +\tset_fake_editor &&\n>> +\tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n>> +\tgit rebase -i --root &&\n>> +\tgit show HEAD^ | grep \"A changed\"\n> \n> I wonder if it should also check that HEAD^ is the root commit, to make\n> sure that the squash-onto commit that's created and then amended has\n> been squashed onto.\n\nHmm, is that something which other tests don't cover or an\nissue that could affect 'rebase -i --root' with reword\ndifferently than other 'rebase -i' commands?\n\nI admit I'm not well-versed in the rebase -i tests and I\nfocused only on creating a test which demonstrated the bug I\nnoticed.\n\n-- \nTodd\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe average woman would rather be beautiful than smart because the\naverage man can see better than he can think.\n\n"},{"id":"350416","messageId":"xmqq8t7byk19.fsf@gitster-ct.c.googlers.com","threadId":"48722","inReplyTo":"20180618164140.GN11827@zaya.teonanacatl.net","subject":"Re: [PATCH 0/2] rebase --root: fix `reword` on a root commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-06-18T19:25:06Z","receivedAt":"2018-06-18T19:25:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n>> Offhand it is not clear from the proposed log message where the\n>> original breakage happened, but if this is to fix a regression\n>> between v2.17.0 and v2.18.0, then let's have it.  As -rc2 slipped\n>> for a few days, it is reasonable to delay the final by a couple of\n>> days as well, if only to give the last minute fixes and translators\n>> reasonable time to breathe.\n>\n> Perhaps replacing the first paragraph with this would make\n> it clearer?\n>\n>     Since 21d0764c82 (\"rebase -i --root: let the sequencer handle even the\n>     initial part\", 2018-05-04), when splitting a repository, running `git\n>     rebase -i --root` to reword the initial commit, Git dies with\n>\n> Alternately, a similar note could be added at the end.\n>\n>     This regression was recently introduced in 21d0764c82 (\"rebase -i \n>     --root: let the sequencer handle even the initial part\", 2018-05-04).\n\nThese certainly are ways to require one less hop to the readers than\nthe original ;-)  Having said that, I've already merged it down to\n'next' and want to have these in 'master' before final, so no need\nto further fix-up the log message anymore.\n\nThanks.\n"},{"id":"350431","messageId":"nycvar.QRO.7.76.6.1806182343421.77@tvgsbejvaqbjf.bet","threadId":"48722","inReplyTo":"20180618164958.GO11827@zaya.teonanacatl.net","subject":"Re: [PATCH 1/2] rebase --root: demonstrate a bug while amending rootcommit messages","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-06-18T21:46:34Z","receivedAt":"2018-06-18T21:46:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Todd,\n\nOn Mon, 18 Jun 2018, Todd Zullinger wrote:\n\n> Phillip Wood wrote:\n> > On 15/06/18 05:31, Johannes Schindelin via GitGitGadget wrote:\n> >> \n> >> From: Todd Zullinger <tmz@pobox.com>\n> >>  \n> >> +test_expect_failure 'rebase -i --root reword root commit' '\n> >> +\ttest_when_finished \"test_might_fail git rebase --abort\" &&\n> >> +\tgit checkout -b reword-root-branch master &&\n> >> +\tset_fake_editor &&\n> >> +\tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n> >> +\tgit rebase -i --root &&\n> >> +\tgit show HEAD^ | grep \"A changed\"\n> > \n> > I wonder if it should also check that HEAD^ is the root commit, to make\n> > sure that the squash-onto commit that's created and then amended has\n> > been squashed onto.\n> \n> Hmm, is that something which other tests don't cover or an\n> issue that could affect 'rebase -i --root' with reword\n> differently than other 'rebase -i' commands?\n> \n> I admit I'm not well-versed in the rebase -i tests and I\n> focused only on creating a test which demonstrated the bug I\n> noticed.\n\nI think we should test this here, to make sure it is tested, and it should\nbe as easy as:\n\n\ttest -z \"$(git show -s --format=%p HEAD^)\"\n\nHopefully you beat me to it, otherwise I will try to take care of this\ntomorrow.\n\nCiao,\nDscho\n"},{"id":"350433","messageId":"20180618221942.GQ11827@zaya.teonanacatl.net","threadId":"48722","inReplyTo":"nycvar.QRO.7.76.6.1806182343421.77@tvgsbejvaqbjf.bet","subject":"[PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-06-18T22:19:42Z","receivedAt":"2018-06-18T22:19:48Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"When testing a reworded root commit, ensure that the squash-onto commit\nwhich is created and amended is still the root commit.\n\nSuggested-by: Phillip Wood <phillip.wood@talktalk.net>\nHelped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Todd Zullinger <tmz@pobox.com>\n---\nHi Johannes,\n\nJohannes Schindelin wrote:\n>On Mon, 18 Jun 2018, Todd Zullinger wrote:\n>> Phillip Wood wrote:\n>>> On 15/06/18 05:31, Johannes Schindelin via GitGitGadget wrote:\n>>>>\n>>>> From: Todd Zullinger <tmz@pobox.com>\n>>>>\n>>>> +test_expect_failure 'rebase -i --root reword root commit' '\n>>>> +  test_when_finished \"test_might_fail git rebase --abort\" &&\n>>>> +  git checkout -b reword-root-branch master &&\n>>>> +  set_fake_editor &&\n>>>> +  FAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n>>>> +  git rebase -i --root &&\n>>>> +  git show HEAD^ | grep \"A changed\"\n>>>\n>>> I wonder if it should also check that HEAD^ is the root commit, to make\n>>> sure that the squash-onto commit that's created and then amended has\n>>> been squashed onto.\n>>\n>> Hmm, is that something which other tests don't cover or an\n>> issue that could affect 'rebase -i --root' with reword\n>> differently than other 'rebase -i' commands?\n>>\n>> I admit I'm not well-versed in the rebase -i tests and I\n>> focused only on creating a test which demonstrated the bug I\n>> noticed.\n>\n> I think we should test this here, to make sure it is tested, and it should\n> be as easy as:\n>\n>        test -z \"$(git show -s --format=%p HEAD^)\"\n>\n> Hopefully you beat me to it, otherwise I will try to take care of this\n> tomorrow.\n\nWith luck, this will save you a few minutes, assuming the\ncommit message is reasonable (or can be improved with help\nfrom Phillip and others). :)\n\nOr Junio may just squash this onto js/rebase-i-root-fix.\n\nThanks.\n\n t/t3404-rebase-interactive.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex e500d7c320..352a52e59d 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -977,7 +977,8 @@ test_expect_success 'rebase -i --root reword root commit' '\n \tset_fake_editor &&\n \tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n \tgit rebase -i --root &&\n-\tgit show HEAD^ | grep \"A changed\"\n+\tgit show HEAD^ | grep \"A changed\" &&\n+\ttest -z \"$(git show -s --format=%p HEAD^)\"\n '\n \n test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '\n-- \nTodd\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nAnyone who is capable of getting themselves made President should on\nno account be allowed to do the job.\n    -- Douglas Adams, \"The Hitchhiker's Guide to the Galaxy\"\n\n"},{"id":"350453","messageId":"nycvar.QRO.7.76.6.1806190853450.77@tvgsbejvaqbjf.bet","threadId":"48722","inReplyTo":"20180618221942.GQ11827@zaya.teonanacatl.net","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-06-19T06:54:11Z","receivedAt":"2018-06-19T06:54:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Todd,\n\nOn Mon, 18 Jun 2018, Todd Zullinger wrote:\n\n> When testing a reworded root commit, ensure that the squash-onto commit\n> which is created and amended is still the root commit.\n> \n> Suggested-by: Phillip Wood <phillip.wood@talktalk.net>\n> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Signed-off-by: Todd Zullinger <tmz@pobox.com>\n\nTrusting that this test passes: ACK!\n\nCiao,\nDscho\n"},{"id":"350485","messageId":"xmqqin6ewyv2.fsf@gitster-ct.c.googlers.com","threadId":"48722","inReplyTo":"20180618221942.GQ11827@zaya.teonanacatl.net","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-06-19T16:00:01Z","receivedAt":"2018-06-19T16:00:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n> With luck, this will save you a few minutes, assuming the\n> commit message is reasonable (or can be improved with help\n> from Phillip and others). :)\n\nOK.\n\n> Or Junio may just squash this onto js/rebase-i-root-fix.\n\nNah, not for a hotfix on the last couple of days before the final.\nWe'd need to build on top, not \"squash\".\n\n>\n> Thanks.\n>\n>  t/t3404-rebase-interactive.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\n> index e500d7c320..352a52e59d 100755\n> --- a/t/t3404-rebase-interactive.sh\n> +++ b/t/t3404-rebase-interactive.sh\n> @@ -977,7 +977,8 @@ test_expect_success 'rebase -i --root reword root commit' '\n>  \tset_fake_editor &&\n>  \tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n>  \tgit rebase -i --root &&\n> -\tgit show HEAD^ | grep \"A changed\"\n> +\tgit show HEAD^ | grep \"A changed\" &&\n> +\ttest -z \"$(git show -s --format=%p HEAD^)\"\n>  '\n>  \n>  test_expect_success C_LOCALE_OUTPUT 'rebase --edit-todo does not work on non-interactive rebase' '\n"},{"id":"350491","messageId":"xmqqa7rqwxuz.fsf@gitster-ct.c.googlers.com","threadId":"48722","inReplyTo":"20180618221942.GQ11827@zaya.teonanacatl.net","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-06-19T16:21:40Z","receivedAt":"2018-06-19T16:21:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n> index e500d7c320..352a52e59d 100755\n> --- a/t/t3404-rebase-interactive.sh\n> +++ b/t/t3404-rebase-interactive.sh\n> @@ -977,7 +977,8 @@ test_expect_success 'rebase -i --root reword root commit' '\n>  \tset_fake_editor &&\n>  \tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n>  \tgit rebase -i --root &&\n> -\tgit show HEAD^ | grep \"A changed\"\n> +\tgit show HEAD^ | grep \"A changed\" &&\n> +\ttest -z \"$(git show -s --format=%p HEAD^)\"\n>  '\n\nThe additional test probably will pass when HEAD is a root commit by\nfailing to refer to HEAD^, resulting an empty output from show.  The\nprevious step would also give an error and won't emit anything that\nwould match \"A changed\", so it probably is OK, though.\n"},{"id":"350527","messageId":"20180619191253.GR11827@zaya.teonanacatl.net","threadId":"48722","inReplyTo":"xmqqin6ewyv2.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2018-06-19T19:12:53Z","receivedAt":"2018-06-19T19:13:01Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Junio C Hamano wrote:\n> Todd Zullinger <tmz@pobox.com> writes:\n>> Or Junio may just squash this onto js/rebase-i-root-fix.\n> \n> Nah, not for a hotfix on the last couple of days before the final.\n> We'd need to build on top, not \"squash\".\n\nIndeed.  I somehow missed that you'd merged and pushed the\nchanges to master and next when I set this.  I was\nmistakenly thinking it was only on the js/rebase-i-root-fix\nintegration branch.\n\nThanks,\n\n-- \nTodd\n"},{"id":"350555","messageId":"nycvar.QRO.7.76.6.1806201301530.11870@tvgsbejvaqbjf.bet","threadId":"48722","inReplyTo":"xmqqin6ewyv2.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-06-20T11:03:21Z","receivedAt":"2018-06-20T11:03:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 19 Jun 2018, Junio C Hamano wrote:\n\n> Todd Zullinger <tmz@pobox.com> writes:\n> \n> > With luck, this will save you a few minutes, assuming the\n> > commit message is reasonable (or can be improved with help\n> > from Phillip and others). :)\n> \n> OK.\n> \n> > Or Junio may just squash this onto js/rebase-i-root-fix.\n> \n> Nah, not for a hotfix on the last couple of days before the final.\n> We'd need to build on top, not \"squash\".\n\nRight. Can we take this on top, at a leisurely pace? I mean: we verified\nthat this works in the upcoming v2.18.0, and it would be nice to have that\nextra regression test safety in the future, but it is not crucial to\ninclude it in v2.18.0 itself.\n\nCiao,\nDscho\n"},{"id":"350557","messageId":"nycvar.QRO.7.76.6.1806201303560.11870@tvgsbejvaqbjf.bet","threadId":"48722","inReplyTo":"xmqqa7rqwxuz.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] t3404: check root commit in 'rebase -i --root reword root commit'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-06-20T11:04:58Z","receivedAt":"2018-06-20T11:05:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 19 Jun 2018, Junio C Hamano wrote:\n\n> Todd Zullinger <tmz@pobox.com> writes:\n> \n> > index e500d7c320..352a52e59d 100755\n> > --- a/t/t3404-rebase-interactive.sh\n> > +++ b/t/t3404-rebase-interactive.sh\n> > @@ -977,7 +977,8 @@ test_expect_success 'rebase -i --root reword root commit' '\n> >  \tset_fake_editor &&\n> >  \tFAKE_LINES=\"reword 1 2\" FAKE_COMMIT_MESSAGE=\"A changed\" \\\n> >  \tgit rebase -i --root &&\n> > -\tgit show HEAD^ | grep \"A changed\"\n> > +\tgit show HEAD^ | grep \"A changed\" &&\n> > +\ttest -z \"$(git show -s --format=%p HEAD^)\"\n> >  '\n> \n> The additional test probably will pass when HEAD is a root commit by\n> failing to refer to HEAD^, resulting an empty output from show.  The\n> previous step would also give an error and won't emit anything that\n> would match \"A changed\", so it probably is OK, though.\n\nThat matches my thinking. Otherwise, we would have had to do the\n\n\tgit show -s --format=%p HEAD^ >out &&\n\ttest_must_be_empty out\n\ndance.\n\nCiao,\nDscho\n"}]}