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

Re: [PATCH] Make object contents optionally available

From
Junio C Hamano <junkio@cox.net>
Date
May 17, 2005, 19:32 UTC
Message-ID
<7vbr79fy22.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.21.0505171325150.30848-100000@iabervon.org>
>>>>> "DB" == Daniel Barkalow <barkalow@iabervon.org> writes:

DB> It wouldn't make any types special; the caller can just control each type DB> individually, so that code that only cares about commits could get commits DB> unpacked, but not get trees unpacked even if it has them parsed.

That is exactly the behaviour I am questioning about.  You are
giving the caller the ability to discriminate objects based on
their _type_ (which is fine and better than not having that
control at all).  Why can't the caller discriminate objects
based on their, say, size for example [*1*]?  That's what I
meant to say by "types are special" but I phrased it so badly.
 
And the callback would solve that naturally.  Or you can
additionally give the callback the result of the parse_xxx(),
which would be even more useful.  The callback can then throw
commit raw-data away based on the date, for example.
[Footnote]

*1* So this hypothethical program uses fast cached raw data for small things but is willing to pay penalty for big things if it later finds those big things turn out to be needed.

Previous: Daniel BarkalowNext: Daniel Barkalow
Message 6 of 7 in “Make object contents optionally available”
  1. Make object contents optionally availableDaniel Barkalow, May 17, 2005
  2. Linus TorvaldsMay 17, 2005
  3. Daniel BarkalowMay 17, 2005
  4. Junio C HamanoMay 17, 2005
  5. Daniel BarkalowMay 17, 2005
  6. Junio C HamanoMay 17, 2005
  7. Daniel BarkalowMay 17, 2005

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.