Re: [PATCH] launch_editor(): indicate that Git waits for user input
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 19, 2017, 01:07 UTC
- Message-ID
- <xmqq8tf3oz3n.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <26256555-4463-7bc9-5d07-8617932cf6cb@gmail.com>
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
Show 8 quoted lines
> $ GIT_EDITOR=gedit ./git commit --allow-empty > Launched your editor, waiting...error: gedit died of signal 15 > error: There was a problem with the editor 'gedit'. > Please supply the message using either -m or -F option. > > Though this is not something that's going to happen very often, I'm > not sure if this is to be considered. Just wanted to note what I > observed.
See my earlier response to Eric Sunshine.
>> + static const char *close_notice = NULL; > > Just a little curious, what's the advantage of making 'close_notice' > 'static' over 'auto' ?
A second call, if an earlier call to the function already determined that our standard error output is going to a terminal and what kind of terminal we are on, would just use the result from the earliser call.
> Being curious again, is flushing 'stderr' required ? AFAIK, 'stderr' > is unbuffered by default and I didn't notice any calls that changed > the buffering mode of it along this code path.
"By default" is the key phrase. The code is merely being defensive to changes in other area of the code.