git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -i: abort cleanly if the editor fails to launch

From
Björn Gustavsson <bgustavsson@gmail.com>
Date
Dec 20, 2009, 07:31 UTC
Message-ID
<6672d0160912192331i7aa770d4ta38207d756d204ff@mail.gmail.com>
In-Reply-To
<7v8wcy7kyc.fsf@alter.siamese.dyndns.org>
2009/12/19 Junio C Hamano <gitster@pobox.com>:
Show 5 quoted lines
> Two questions:
>
>  - Is emacsclient the _only_ editor that can exit with non-zero status to
>   signal an error condition "the user invoked me to edit an existing
>   file, but I ended up not letting the user edit it"?

I have no idea, but my guess is that it would only happen in exceptional circumstances (e.g. a file system that has run out of space).

Show 9 quoted lines
>  - Are there editors that let you exit with non-zero status on demand?
>
> The above is not a complaint to your log message, but is a genuine request
> for information.
>
> An editor that can exit with non-zero status on demand could use this
> codepath to abort the rebase, when a user realizes that the edit s/he has
> done so far was completely bogus [*1*].  In such a case, the existing
> error message "Could not execute editor" may sound funny.

Again, no idea, but I have never heard of such a feature. I think that anyone advanced enough to use such a feature in an editor would not be troubled by "Could not execute editor".

I mentioned emacsclient because it is a real annoyance that has bitten me more than once (usually because I have closed my local emacs while working on a remote computer because I prefer to only keep windows that I am actively working with), but my patch will help if the user has configured a non-existent editor too (but such a problem usually only happens once).

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
Previous: Junio C Hamano
Message 5 of 5 in “rebase -i: abort cleanly if the editor fails to launch”
  1. rebase -i: abort cleanly if the editor fails to launchBjörn Gustavsson, Dec 19, 2009
  2. Junio C HamanoDec 19, 2009
  3. Johannes SchindelinDec 19, 2009
  4. Junio C HamanoDec 20, 2009
  5. Björn GustavssonDec 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.