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

Re: [PATCH] convert: Stream from fd to required clean filter instead of mmap

From
prohaska@zib.de <prohaska@zib.de>
Date
Aug 6, 2014, 04:32 UTC
Message-ID
<683E5A36-1D64-4185-8C81-E7D8EDB72DE9@zib.de>
In-Reply-To
<36DA9A8E-2F61-4DD3-9F82-427976C710A6@zib.de>
On Aug 6, 2014, at 6:22 AM, Steffen Prohaska <prohaska@zib.de> wrote:
Show 10 quoted lines
> On Aug 4, 2014, at 9:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
>>> +	return apply_filter(path, 0, 0, -1, 0, ca.drv->clean);
>> 
>> What's the significance of "-1" here?  Does somebody in the
>> callchain from apply_filter() check if fd < 0 and act differently
>> (not a complaint nor rhetoric question)?
> 
> The decision in apply_filter() to return before the real work is
> taken on the first 0.

Hmm..., actually it's the last 0 that matters. If no destination buffer is given, apply_filter() returns whether it would filter or not.

>  Any value for fd would be ok.  The -1 is
> only a reminder that the fd is invalid.
	Steffen
Previous: Steffen Prohaska
Message 4 of 4 in “convert: Stream from fd to required clean filter instead of mmap”
  1. convert: Stream from fd to required clean filter instead of mmapSteffen Prohaska, Aug 3, 2014
  2. Junio C HamanoAug 4, 2014
  3. Steffen ProhaskaAug 6, 2014
  4. prohaska@zib.deAug 6, 2014

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.