Re: [PATCH v4 2/2] launch_editor(): indicate that Git waits for user input
- Date: Fri, 1 Dec 2017 09:26:58 +0530
- From: Kaartic Sivaraam <kaartic.sivaraam@xxxxxxxxx>
- Subject: Re: [PATCH v4 2/2] launch_editor(): indicate that Git waits for user input
On Friday 01 December 2017 02:21 AM, Jeff King wrote:
These are obviously the result of devils-advocate poking at the feature.
I doubt any editor would end its output with a CR. But the first case is
probably going to be common, especially for actual graphical editors. We
know that emacsclient prints its own line, and I wouldn't be surprised
if other graphical editors spew some telemetry to stderr (certainly
anything built against GTK tends to do so).
Yeah, at times 'gedit' does do what you say. And if the user
(surprisingly!) uses an IDE such as "eclipse" or a hackable text editor
"atom" (of course with the '-f' option) for entering his commit message
it is likely to happen all the time for him.
I don't think there's a good way around it. Portably saying "delete
_this_ line that I wrote earlier" would probably require libcurses or
similar. So maybe we just live with it. The deletion magic makes the
common cases better (a terminal editor that doesn't print random
lines, or a graphical editor that is quiet), and everyone else can flip
the advice switch if they need to. I dunno.