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

Re: [PATCH v1] convert: add "status=delayed" to filter process protocol

From
Lars Schneider <larsxschneider@gmail.com>
Date
Jan 11, 2017, 09:48 UTC
Message-ID
<8267E408-85B2-457E-8B14-5C476343378A@gmail.com>
In-Reply-To
<20170108201415.GA3569@tb-raspi>
Show 30 quoted lines
> On 08 Jan 2017, at 21:14, Torsten Bögershausen <tboegi@web.de> wrote:
> 
> On Sun, Jan 08, 2017 at 08:17:36PM +0100, larsxschneider@gmail.com wrote:
>> From: Lars Schneider <larsxschneider@gmail.com>
>> 
>> Some `clean` / `smudge` filters might require a significant amount of
>> time to process a single blob. During this process the Git checkout
>> operation is blocked and Git needs to wait until the filter is done to
>> continue with the checkout.
>> 
>> Teach the filter process protocol (introduced in edcc858) to accept the
>> status "delayed" as response to a filter request. Upon this response Git
>> continues with the checkout operation and asks the filter to process the
>> blob again after all other blobs have been processed.
>> 
>> Git has a multiple code paths that checkout a blob. Support delayed
>> checkouts only in `clone` (in unpack-trees.c) and `checkout` operations.
>> 
>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>> ---
>> 
> 
> Some feeling tells me that it may be better to leave convert_to_working_tree() as it is.
> And change convert_to_working_tree_internal as suggested:
> 
> int convert_to_working_tree(const char *path, const char *src, size_t len, struct strbuf *dst)
> {
> -	return convert_to_working_tree_internal(path, src, len, dst, 0);
> +	return convert_to_working_tree_internal(path, src, len, dst, NULL, 0);
> }

If I do this then I would have no way to communicate to the caller that the processing is delayed. Consequently the caller would not know that an additional call is necessary to fetch the result.

Thanks, Lars

Previous: Torsten BögershausenNext: Eric Wong
Message 3 of 15 in “convert: add "status=delayed" to filter process protocol”
  1. convert: add "status=delayed" to filter process protocollarsxschneider@gmail.com, Jan 8, 2017
  2. Torsten BögershausenJan 8, 2017
  3. Lars SchneiderJan 11, 2017
  4. Eric WongJan 8, 2017
  5. Lars SchneiderJan 11, 2017
  6. Junio C HamanoJan 8, 2017
  7. Jakub NarębskiJan 10, 2017
  8. Taylor BlauJan 10, 2017
  9. Lars SchneiderJan 11, 2017
  10. Jakub NarębskiJan 11, 2017
  11. Junio C HamanoJan 11, 2017
  12. Lars SchneiderJan 11, 2017
  13. Junio C HamanoJan 11, 2017
  14. Lars SchneiderJan 11, 2017
  15. Taylor BlauJan 11, 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.