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

Re: [PATCH] do not require filters to consume stdin

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 29, 2011, 22:53 UTC
Message-ID
<7vobz74yoe.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110829203107.GA4946@gnu.kitenet.net>
Joey Hess <joey@kitenet.net> writes:
Show 9 quoted lines
> There has been discussion before about using clean and smudge filters
> with %f to handle big files in git, with the file content stored outside
> git somewhere.  A simplistic clean filter for large files could look
> like this:
>
> #!/bin/sh
> file="$1"
> ln -f $file ~/.big/$file
> echo $file

Isn't this filter already broken if clean request is for a blob contents that is different from what is on the filesystem? The name %f is passed to give the filter a _hint_ on what the path is about (so that the filter can choose to work differently depending on the extension, for example), but the data may or may not come from the filesystem, depending on what is calling the filter, no?

Most notably, renormalize_buffer() would call convert_to_git() on a buffer that is internal, possibly quite different from what is in the working tree.

Previous: Joey HessNext: Joey Hess
Message 2 of 7 in “do not require filters to consume stdin”
  1. do not require filters to consume stdinJoey Hess, Aug 29, 2011
  2. Junio C HamanoAug 29, 2011
  3. Joey HessAug 30, 2011
  4. hooks that do not consume stdin sometimes crash git with SIGPIPEJoey Hess, Dec 5, 2011
  5. Jeff KingDec 5, 2011
  6. Junio C HamanoDec 6, 2011
  7. Joey HessDec 6, 2011

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.