git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Kaartic Sivaraam
Message 16 of 16 in “[RFC] Indicate that Git waits for user input via editor”
  1. Lars SchneiderNov 15, 2017
  2. Stefan BellerNov 15, 2017
  3. Lars SchneiderNov 15, 2017
  4. Stefan BellerNov 15, 2017
  5. Junio C HamanoNov 15, 2017
  6. Stefan BellerNov 16, 2017
  7. Junio C HamanoNov 16, 2017
  8. Stefan BellerNov 16, 2017
  9. Junio C HamanoNov 16, 2017
  10. launch_editor(): indicate that Git waits for user inputJunio C Hamano, Nov 16, 2017
  11. Lars SchneiderNov 16, 2017
  12. Junio C HamanoNov 16, 2017
  13. Lars SchneiderNov 16, 2017
  14. Junio C HamanoNov 17, 2017
  15. Kaartic SivaraamNov 18, 2017
  16. Junio C HamanoNov 19, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.