{"thread":{"id":"62617","subject":"git rebase --continue error message is misleading","startedAt":"2024-12-09T13:02:15Z","lastAt":"2025-02-10T16:59:38Z","messageCount":4,"participants":["Björn Lindqvist","Phillip Wood","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"508865","messageId":"CALG+76eJL5dC3o+yq7zreoRDQan1MPgfNXB42k5f2iq2bZEbNw@mail.gmail.com","threadId":"62617","inReplyTo":null,"subject":"git rebase --continue error message is misleading","fromName":"Björn Lindqvist","fromEmail":"bjourne@gmail.com","sentAt":"2024-12-09T13:02:03Z","receivedAt":"2024-12-09T13:02:15Z","isPatch":false,"sender":{"key":"bjourne@gmail.com","avatar":null},"body":"$ LANG=C git rebase --continue\nhint: Waiting for your editor to close the file... error: cannot run\nvi: No such file or directory\nerror: unable to start editor 'vi'\nPlease supply the message using either -m or -F option.\nerror: could not commit staged changes.\n$ git rebase --continue -m \"done\"\n...\n$ git rebase --continue -F \"done ffs\"\n...\n\nIt should say: Please commit the staged changes using git commit -m\n\"commit message\"\n\n\n-- \nmvh/best regards Björn Lindqvist\n"},{"id":"509103","messageId":"534e8534-a9bd-428b-87f9-a512c9378b19@gmail.com","threadId":"62617","inReplyTo":"CALG+76eJL5dC3o+yq7zreoRDQan1MPgfNXB42k5f2iq2bZEbNw@mail.gmail.com","subject":"Re: git rebase --continue error message is misleading","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2024-12-13T14:38:00Z","receivedAt":"2024-12-13T14:38:04Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Björn\n\nThanks for reporting this\n\nOn 09/12/2024 13:02, Björn Lindqvist wrote:\n> $ LANG=C git rebase --continue\n> hint: Waiting for your editor to close the file... error: cannot run\n> vi: No such file or directory\n> error: unable to start editor 'vi'\n> Please supply the message using either -m or -F option.\n\nThis line comes from \"git commit\" whenever launch_editor() fails. I \nwonder if we'd be better to recommend that the user sets up a working \neditor instead. The message is certainly unhelpful when we run \"git \ncommit\" from \"git cherry-pick/merge/rebase/revert\" where we want to seed \nthe message that the user edits.\n\n> error: could not commit staged changes.\n> $ git rebase --continue -m \"done\"\n> ...\n> $ git rebase --continue -F \"done ffs\"\n> ...\n> \n> It should say: Please commit the staged changes using git commit -m\n> \"commit message\"\n\nI don't think that is a good idea when \"git commit\" is being run from \n\"git rebase\". In that case we want to preserve the original message and \nauthorship and using '-F' or '-m' would not do that.\n\nBest Wishes\n\nPhillip\n\n"},{"id":"512172","messageId":"CALG+76erpDGFinXsockB8=+GPEoEtd+xw=xVN1HCzv7=aFymoA@mail.gmail.com","threadId":"62617","inReplyTo":"534e8534-a9bd-428b-87f9-a512c9378b19@gmail.com","subject":"Re: git rebase --continue error message is misleading","fromName":"Björn Lindqvist","fromEmail":"bjourne@gmail.com","sentAt":"2025-02-10T10:19:47Z","receivedAt":"2025-02-10T10:19:59Z","isPatch":false,"sender":{"key":"bjourne@gmail.com","avatar":null},"body":"Den fre 13 dec. 2024 kl 15:38 skrev Phillip Wood <phillip.wood123@gmail.com>:\n> On 09/12/2024 13:02, Björn Lindqvist wrote:\n> > $ LANG=C git rebase --continue\n> > hint: Waiting for your editor to close the file... error: cannot run\n> > vi: No such file or directory\n> > error: unable to start editor 'vi'\n> > Please supply the message using either -m or -F option.\n>\n> This line comes from \"git commit\" whenever launch_editor() fails. I\n> wonder if we'd be better to recommend that the user sets up a working\n> editor instead. The message is certainly unhelpful when we run \"git\n> commit\" from \"git cherry-pick/merge/rebase/revert\" where we want to seed\n> the message that the user edits.\n\nHere, I don't think assuming the user has vi installed is correct.\n\n> I don't think that is a good idea when \"git commit\" is being run from\n> \"git rebase\". In that case we want to preserve the original message and\n> authorship and using '-F' or '-m' would not do that.\n\nThe error should tell you about that, I think. Right now I get:\n\nLANG=C git commit\nhint: Waiting for your editor to close the file... error: cannot run\nvi: No such file or directory\nerror: unable to start editor 'vi'\nPlease supply the message using either -m or -F option.\n\nThe only solution I've found is git commit -m \"blah\".\n\n\n-- \nmvh/best regards Björn Lindqvist\n"},{"id":"512184","messageId":"xmqqv7thburt.fsf@gitster.g","threadId":"62617","inReplyTo":"CALG+76erpDGFinXsockB8=+GPEoEtd+xw=xVN1HCzv7=aFymoA@mail.gmail.com","subject":"Re: git rebase --continue error message is misleading","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-02-10T16:59:34Z","receivedAt":"2025-02-10T16:59:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Björn Lindqvist <bjourne@gmail.com> writes:\n\n> Here, I don't think assuming the user has vi installed is correct.\n\nExporting GIT_EDITOR that points at the editor of your choice is\nexactly for those who choose to use something else.  Instead of\nerroring out with \"You haven't told me what editor you want to use\",\neditor.c has a fallback default to use DEFAULT_EDITOR that can be\nconfigured at the compile time, and if the builder does not configure\nit, then it falls back to \"vi\".  We'd need to stop somewhere ;-)\n\n"}]}