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

Re: [PATCH] Enhance unpack-objects for extracting large objects

From
Junio C Hamano <junkio@cox.net>
Date
May 25, 2007, 19:59 UTC
Message-ID
<7viragr7xb.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<56b7f5510705251249u74b754f1y4f8cafd5f5c35f19@mail.gmail.com>
"Dana How" <danahow@gmail.com> writes:
Show 7 quoted lines
>>  * You already have the size here, so if min_blob_size is set
>>    and the size is larger, you do not even have to call
>>    write_sha1_file() at all.
> The way I read the code,  it looks like unpack-objects needs
> the last argument always to be initialized with the SHA-1 computed
> from the object contents.  Therefore I always need to call
> write_sha1_file(),  even if I don't want it to write anything.
Ah, that is what I missed.

There is a separate function to only hash, named (surprisingly) "hash_sha1_file(). Maybe you can teach the caller's "don't write it out" codepath to call it.

Previous: Dana HowNext: Nicolas Pitre
Message 5 of 7 in “Enhance unpack-objects for extracting large objects”
  1. Enhance unpack-objects for extracting large objectsDana How, May 25, 2007
  2. Nicolas PitreMay 25, 2007
  3. Junio C HamanoMay 25, 2007
  4. Dana HowMay 25, 2007
  5. Junio C HamanoMay 25, 2007
  6. Nicolas PitreMay 25, 2007
  7. Nicolas PitreMay 25, 2007

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.