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

Re: proposal for extending smudge/clean filters with raw file access

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2016, 19:01 UTC
Message-ID
<xmqqvb2jf6dg.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160512182432.GA27427@kitenet.net>
Joey Hess <id@joeyh.name> writes:
Show 14 quoted lines
> I'm using smudge/clean filters in git-annex now, and it's not been an
> entirely smooth fit between the interface and what git-annex wants
> to do.
>
> The clean filter has to consume the whole file content on stdin;
> not reading it all will make git think the clean filter failed.
> But, git-annex often doesn't need to read the whole content of a
> work-tree file in order to clean it.
>
> The smudge filter has to output the whole file content to stdout. But
> git-annex often has the file's content on disk already, and could just
> move it into place in the working tree. This would save CPU and IO and
> often disk space too. But the smudge interface doesn't let git-annex use
> the efficient approach.

The smudge happens to be the last to run, so it is quite true that it can say "Hey Git, I've written it out already".

I didn't check all codepaths to ensure that we won't need the smudged result in core at all, but I am guessing you did so before making this proposal, so in that case I would say this sounds fine.

Previous: Joey HessNext: Joey Hess
Message 2 of 7 in “proposal for extending smudge/clean filters with raw file access”
  1. Joey HessMay 12, 2016
  2. Junio C HamanoMay 12, 2016
  3. Joey HessMay 12, 2016
  4. Junio C HamanoMay 12, 2016
  5. Joey HessMay 12, 2016
  6. Junio C HamanoMay 12, 2016
  7. Joey HessMay 12, 2016

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.