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

Re: [PATCH WIP 0/4] Special code path for large blobs

From
Nicolas Pitre <nico@cam.org>
Date
May 28, 2009, 18:03 UTC
Message-ID
<alpine.LFD.2.00.0905281349320.3906@xanadu.home>
In-Reply-To
<1243488550-15357-1-git-send-email-pclouds@gmail.com>
On Thu, 28 May 2009, Nguy�n Th�i Ng�c Duy wrote:
Show 14 quoted lines
> Thread "Problem with large files on different OSes" reminds me this.
> This series is in my repository for quite some time. It addresses
> adding/checking out large blobs as long as:
> 
>  - no conversion will be done
>  - blobs are loose (in checkout case)
> 
> Together with a patch that prevents large blobs from being packed
> (something like Dana How sent long ago), and a modification of "lazy
> clone/remote alternatives" patch to avoid packing large blobs again
> for sending over network, I think it should make git possible for
> large files.
> 
> Just something to play.
I think this is a good start.

However, like I said previously, I'd encapsulate large blobs in a pack right away instead of storing them as loose objects. The reason is that you can effortlessly repack/fetch/push them afterwards by simply triggering the pack data reuse code path for them. Extracting large and undeltified blobs from a pack is just as easy as from a loose object.

To accomplish that, you only need to copy write_pack_file() from builtin-pack-objects.c and strip it to the bone with only one object to write.

Nicolas
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 6 of 9 in “Special code path for large blobs”
  1. 0/4 Special code path for large blobsNguyễn Thái Ngọc Duy, May 28, 2009
  2. 1/4 convert.c: refactor in order to skip conversion early without looking into file contentNguyễn Thái Ngọc Duy, May 28, 2009
  3. 2/4 sha1_file.c: add streaming interface for reading blobsNguyễn Thái Ngọc Duy, May 28, 2009
  4. 3/4 write_entry: use streaming interface for checkout large filesNguyễn Thái Ngọc Duy, May 28, 2009
  5. 4/4 index_fd: support indexing large filesNguyễn Thái Ngọc Duy, May 28, 2009
  6. Nicolas PitreMay 28, 2009
  7. Nguyen Thai Ngoc DuyJun 2, 2009
  8. Shawn O. PearceJun 2, 2009
  9. Nicolas PitreJun 2, 2009

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.