* git rebase --continue error message is misleading
@ 2024-12-09 13:02 Björn Lindqvist
2024-12-13 14:38 ` Phillip Wood
0 siblings, 1 reply; 4+ messages in thread
From: Björn Lindqvist @ 2024-12-09 13:02 UTC (permalink / raw)
To: git
$ LANG=C git rebase --continue
hint: Waiting for your editor to close the file... error: cannot run
vi: No such file or directory
error: unable to start editor 'vi'
Please supply the message using either -m or -F option.
error: could not commit staged changes.
$ git rebase --continue -m "done"
...
$ git rebase --continue -F "done ffs"
...
It should say: Please commit the staged changes using git commit -m
"commit message"
--
mvh/best regards Björn Lindqvist
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git rebase --continue error message is misleading
2024-12-09 13:02 git rebase --continue error message is misleading Björn Lindqvist
@ 2024-12-13 14:38 ` Phillip Wood
2025-02-10 10:19 ` Björn Lindqvist
0 siblings, 1 reply; 4+ messages in thread
From: Phillip Wood @ 2024-12-13 14:38 UTC (permalink / raw)
To: Björn Lindqvist, git
Hi Björn
Thanks for reporting this
On 09/12/2024 13:02, Björn Lindqvist wrote:
> $ LANG=C git rebase --continue
> hint: Waiting for your editor to close the file... error: cannot run
> vi: No such file or directory
> error: unable to start editor 'vi'
> Please supply the message using either -m or -F option.
This line comes from "git commit" whenever launch_editor() fails. I
wonder if we'd be better to recommend that the user sets up a working
editor instead. The message is certainly unhelpful when we run "git
commit" from "git cherry-pick/merge/rebase/revert" where we want to seed
the message that the user edits.
> error: could not commit staged changes.
> $ git rebase --continue -m "done"
> ...
> $ git rebase --continue -F "done ffs"
> ...
>
> It should say: Please commit the staged changes using git commit -m
> "commit message"
I don't think that is a good idea when "git commit" is being run from
"git rebase". In that case we want to preserve the original message and
authorship and using '-F' or '-m' would not do that.
Best Wishes
Phillip
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git rebase --continue error message is misleading
2024-12-13 14:38 ` Phillip Wood
@ 2025-02-10 10:19 ` Björn Lindqvist
2025-02-10 16:59 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Björn Lindqvist @ 2025-02-10 10:19 UTC (permalink / raw)
To: phillip.wood; +Cc: git
Den fre 13 dec. 2024 kl 15:38 skrev Phillip Wood <phillip.wood123@gmail.com>:
> On 09/12/2024 13:02, Björn Lindqvist wrote:
> > $ LANG=C git rebase --continue
> > hint: Waiting for your editor to close the file... error: cannot run
> > vi: No such file or directory
> > error: unable to start editor 'vi'
> > Please supply the message using either -m or -F option.
>
> This line comes from "git commit" whenever launch_editor() fails. I
> wonder if we'd be better to recommend that the user sets up a working
> editor instead. The message is certainly unhelpful when we run "git
> commit" from "git cherry-pick/merge/rebase/revert" where we want to seed
> the message that the user edits.
Here, I don't think assuming the user has vi installed is correct.
> I don't think that is a good idea when "git commit" is being run from
> "git rebase". In that case we want to preserve the original message and
> authorship and using '-F' or '-m' would not do that.
The error should tell you about that, I think. Right now I get:
LANG=C git commit
hint: Waiting for your editor to close the file... error: cannot run
vi: No such file or directory
error: unable to start editor 'vi'
Please supply the message using either -m or -F option.
The only solution I've found is git commit -m "blah".
--
mvh/best regards Björn Lindqvist
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git rebase --continue error message is misleading
2025-02-10 10:19 ` Björn Lindqvist
@ 2025-02-10 16:59 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2025-02-10 16:59 UTC (permalink / raw)
To: Björn Lindqvist; +Cc: phillip.wood, git
Björn Lindqvist <bjourne@gmail.com> writes:
> Here, I don't think assuming the user has vi installed is correct.
Exporting GIT_EDITOR that points at the editor of your choice is
exactly for those who choose to use something else. Instead of
erroring out with "You haven't told me what editor you want to use",
editor.c has a fallback default to use DEFAULT_EDITOR that can be
configured at the compile time, and if the builder does not configure
it, then it falls back to "vi". We'd need to stop somewhere ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-10 16:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 13:02 git rebase --continue error message is misleading Björn Lindqvist
2024-12-13 14:38 ` Phillip Wood
2025-02-10 10:19 ` Björn Lindqvist
2025-02-10 16:59 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).