{"thread":{"id":"60868","subject":"Supporting --no-edit for git rebase --continue","startedAt":"2024-02-07T20:46:29Z","lastAt":"2024-02-09T16:16:24Z","messageCount":4,"participants":["Orgad Shaneh","brian m. carlson","Phillip Wood"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"488169","messageId":"CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com","threadId":"60868","inReplyTo":null,"subject":"Supporting --no-edit for git rebase --continue","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2024-02-07T20:46:16Z","receivedAt":"2024-02-07T20:46:29Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Hi,\n\nIs it possible to add --no-edit for git rebase --continue, similar to\nthe functionality of this flag for git cherry-pick --continue and\nsimilar commands?\n\nThis should continue the rebase without activating the commit message\neditor, and just keep the existing message.\n\nThanks,\n- Orgad\n"},{"id":"488262","messageId":"ZcWCDEnmv97orQyY@tapette.crustytoothpaste.net","threadId":"60868","inReplyTo":"CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com","subject":"Re: Supporting --no-edit for git rebase --continue","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-02-09T01:38:20Z","receivedAt":"2024-02-09T01:38:28Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-02-07 at 20:46:16, Orgad Shaneh wrote:\n> Hi,\n> \n> Is it possible to add --no-edit for git rebase --continue, similar to\n> the functionality of this flag for git cherry-pick --continue and\n> similar commands?\n\nI haven't checked whether this is actually possible, but I imagine it is\nwith some work.  I think it would be a valuable feature to add, but I\ndon't think anyone's planning on working on it.  Would you be willing to\nsend a patch?  Even if many people think it's a good idea, we're all\nbusy, and thus it'll only be implemented if someone is willing to pick\nit up.\n\nIn the meantime, you could try setting `GIT_EDITOR=:` in your\nenvironment (for example, using an alias) like so:\n\n[alias]\n  rncontinue = \"!f() { GIT_EDITOR=: git rebase --continue; };f\"\n\nand that can serve as a workaround.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"},{"id":"488289","messageId":"CAGHpTB+_yo24d5wtTnxCHF+i+wLCiq3XjjpmaX1Z=AOxFjx+mQ@mail.gmail.com","threadId":"60868","inReplyTo":"ZcWCDEnmv97orQyY@tapette.crustytoothpaste.net","subject":"Re: Supporting --no-edit for git rebase --continue","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2024-02-09T13:35:42Z","receivedAt":"2024-02-09T13:35:56Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"On Fri, Feb 9, 2024 at 3:38 AM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> On 2024-02-07 at 20:46:16, Orgad Shaneh wrote:\n> > Hi,\n> >\n> > Is it possible to add --no-edit for git rebase --continue, similar to\n> > the functionality of this flag for git cherry-pick --continue and\n> > similar commands?\n>\n> I haven't checked whether this is actually possible, but I imagine it is\n> with some work.  I think it would be a valuable feature to add, but I\n> don't think anyone's planning on working on it.  Would you be willing to\n> send a patch?  Even if many people think it's a good idea, we're all\n> busy, and thus it'll only be implemented if someone is willing to pick\n> it up.\n\nThank you. I'll try to prepare a patch.\n\n> In the meantime, you could try setting `GIT_EDITOR=:` in your\n> environment (for example, using an alias) like so:\n>\n> [alias]\n>   rncontinue = \"!f() { GIT_EDITOR=: git rebase --continue; };f\"\n>\n> and that can serve as a workaround.\n\nNice, thanks!\n\n- Orgad\n"},{"id":"488296","messageId":"fbf859ca-43f4-433e-b111-377aa60f1947@gmail.com","threadId":"60868","inReplyTo":"CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com","subject":"Re: Supporting --no-edit for git rebase --continue","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2024-02-09T16:16:22Z","receivedAt":"2024-02-09T16:16:24Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Orgad\n\nOn 07/02/2024 20:46, Orgad Shaneh wrote:\n> Hi,\n> \n> Is it possible to add --no-edit for git rebase --continue, similar to\n> the functionality of this flag for git cherry-pick --continue and\n> similar commands?\n> \n> This should continue the rebase without activating the commit message\n> editor, and just keep the existing message.\n\nI think being able to say \"git rebase --continue --no-edit\" to stop\nrebase prompting for a commit message when resolving a conflict would\nbe useful but it would need to be careful that it did not suppress the\neditor for \"reword\", \"squash\", or \"fixup\" commands. You can use an\nalias that only runs the editor if HEAD has changed since the rebase\nwas continued to do this\n\n     git config alias.rbc-no-edit '!\n         no_edit_head=$(git show-ref -s --verify HEAD) &&\n         real_editor=\"$(git var GIT_EDITOR)\" &&\n         GIT_EDITOR=\"test \\\"\\$(git show-ref -s --verify HEAD)\\\" = \\\"$no_edit_head\\\" || \\\n             $real_editor\" git rebase --continue'\n\nBest Wishes\n\nPhillip\n"}]}