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

Re: [RFC v3] cat-file: add a --stdin-cmd mode

From
John Cai <johncai86@gmail.com>
Date
Feb 1, 2022, 19:27 UTC
Message-ID
<674CD40F-7060-4892-97CD-1940AEF7C3D7@gmail.com>
In-Reply-To
<YflzZsb/txsopusP@nand.local>
Hi Taylor,
On 1 Feb 2022, at 12:52, Taylor Blau wrote:
Show 12 quoted lines
> On Tue, Feb 01, 2022 at 10:39:30AM +0100, Christian Couder wrote:
>> Also I think at this point this should probably not be an RFC patch
>> anymore but a regular one.
>
> I think that this is due to my first "review" in [1], where I tried to
> get an understanding of what John's concrete usage plans were, since I
> couldn't figure out what they were on my own.
>
> I'm not sure that I've seen a response along the lines of "we need to
> control when the output stream is flushed in order to do ..." yet, but I
> would be interested to see one before moving too much further ahead of
> where we already are.

This would be useful when there is another process A interacting with a long running git cat-file process B that is retrieving object information from the odb interactively but also wants to use --buffer mode.

In this scenario, if A is asked to retrieve a large list of object metadata, it wants to use --buffer mode to be more efficient but it would need a way to ensure that all of the contents have been flushed to the output. If we want to keep B running to save startup time (since otherwise we might need to spawn many git cat-file processes), then having a flush command where we can guarantee a flush would be very handy.

>
> (Apologies if such a response was written, and I missed it).
Nope, don't think I explained the need for a flush command very clearly.
thanks
Show 5 quoted lines
>
> Thanks,
> Taylor
>
> [1]: https://lore.kernel.org/git/YehomwNiIs0l83W7@nand.local/
Previous: Taylor BlauNext: Taylor Blau
Message 7 of 12 in “[RFC v3] cat-file: add a --stdin-cmd mode”
  1. John CaiJan 28, 2022
  2. Bagas SanjayaJan 31, 2022
  3. Junio C HamanoJan 31, 2022
  4. Ævar Arnfjörð BjarmasonFeb 1, 2022
  5. Christian CouderFeb 1, 2022
  6. Taylor BlauFeb 1, 2022
  7. John CaiFeb 1, 2022
  8. Taylor BlauFeb 1, 2022
  9. John CaiFeb 2, 2022
  10. Phillip WoodFeb 1, 2022
  11. John CaiFeb 2, 2022
  12. Taylor BlauFeb 2, 2022

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.