Kaartic Sivaraam <kaartic.sivar...@gmail.com> writes:

> $ 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.

Reply via email to