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
Junio C Hamano <gitster@pobox.com>
Date
Jan 8, 2017, 23:42 UTC
Message-ID
<xmqqa8b115ll.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170108191736.47359-1-larsxschneider@gmail.com>
larsxschneider@gmail.com writes:
Show 11 quoted lines
> 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.
Hmm, I would have expected that the basic flow would become
	for each paths to be processed:
		convert-to-worktree to buf
		if not delayed:
			do the caller's thing to use buf
		else:
			remember path
	for each delayed paths:
		ensure filter process finished processing for path
		fetch the thing to buf from the process
		do the caller's thing to use buf

and that would make quite a lot of sense. However, what is actually implemented is a bit disappointing from that point of view. While its first part is the same as above, the latter part instead does:

	for each delayed paths:
		checkout the path

Presumably, checkout_entry() does the "ensure that the process is done converting" (otherwise the result is simply buggy), but what disappoints me is that this does not allow callers that call "convert-to-working-tree", whose interface is obtain the bytestream in-core in the working tree representation, given an object in the object-db representation in an in-core buffer, to _use_ the result of the conversion. The caller does not have a chance to even see the result as it is written straight to the filesystem, once it calls checkout_delayed_entries().

Previous: Lars SchneiderNext: Jakub Narębski
Message 6 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.