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

Re: [PATCH] git-update-index: report(...) now flushes stdout after printing the report line

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 30, 2009, 19:46 UTC
Message-ID
<7v1vic1bzh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091230224122.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Junio, could you tell us what happened to this thread?

I didn't feel I had enough energy to read the commit log message after seeing it was badly linewrapped and didn't have a sign-off, so I didn't read it.

I've read it now; it is unclear from the proposed commit log message how this fits in the larger picture. Presumably this change is meant to be useful when driving update-index through --stdin? To see if I got the intention right, let me try paraphrasing it...

    update-index: flush standard output after each action is reported
    A scripted Porcelain that runs "git update-index --stdin" might want
    to use a bidirectional pipe, while feeding one path at a time and
    reading the output from report() every time after feeding a path.
    Such a Porcelain would deadlock if the standard output is not flushed
    after report().
I don't know if the above is what Sebastian meant, though..

An obvious question, when phrased this way, is "what impact does this change have for scripted Porcelains that don't use bi-di pipe?" I think the answer would be "The I/O overhead for flushing would increase", but I don't know if it would be "... would increase but it is still negligible" or "... would increase too much to make it noticeably or unusably slow especially if it feeds hundreds of paths". If it is the latter, this may need to be controlled by another command line option.

Sebastian, care to redo the justification, make it a bit more readable, and add your sign-off?

Thanks.
Previous: Nanako ShiraishiNext: Sebastian Thiel
Message 3 of 9 in “git-update-index: report(...) now flushes stdout after printing the report line”
  1. git-update-index: report(...) now flushes stdout after printing the report lineSebastian Thiel, Nov 19, 2009
  2. Nanako ShiraishiDec 30, 2009
  3. Junio C HamanoDec 30, 2009
  4. Sebastian ThielDec 30, 2009
  5. Sebastian ThielJan 3, 2010
  6. Tay Ray ChuanJan 3, 2010
  7. Sebastian ThielJan 4, 2010
  8. Junio C HamanoJan 6, 2010
  9. Tay Ray ChuanJan 6, 2010

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.