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