Re: [PATCH v4 0/2] launch_editor(): indicate that Git waits for user input
- From
Thomas Adam <thomas@xteddy.org>
- Date
- Nov 30, 2017, 14:42 UTC
- Message-ID
- <20171130144255.5w72jcpz4a5igiro@laptop>
- In-Reply-To
- <C91E8F24-DD13-4FEC-BAB3-A8B8F2DBBA8D@gmail.com>
On Thu, Nov 30, 2017 at 02:55:35PM +0100, Lars Schneider wrote:
Show 16 quoted lines
>
> > On 29 Nov 2017, at 19:35, Thomas Adam <thomas@xteddy.org> wrote:
> >
> > On Wed, Nov 29, 2017 at 03:37:50PM +0100, lars.schneider@autodesk.com wrote:
> >> + if (print_waiting_for_editor) {
> >> + fprintf(stderr, _("hint: Waiting for your editor input..."));
> >> fflush(stderr);
> >
> > Just FYI, stderr is typically unbuffered on most systems I've used, and
> > although the call to fflush() is harmless, I suspect it's not having any
> > effect. That said, there's plenty of other places in Git which seems to think
> > fflush()ing stderr actually does something.
>
> I agree with the "unbuffered" statement. I am surprised that you expect fflush()
> to do nothing in that situation... but I am no expert in that area. Can you
> point me to some documentation?Because stderr is unbuffered, it will get printed immediately.
> In any way, would all this be a problem here? The worst that could happen would > be that the user would not see the message, right?
Correct -- I only bring this up because your interdiff showed you added the fflush() call and I was merely pointing that out. I don't expect you to change it.
> Are you aware of stderr usage in Git that could cause more trouble?
No. It'll all be fine.
-- Thomas Adam