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

Delta-transfer using thin-pack

From
Junio C Hamano <junkio@cox.net>
Date
Feb 19, 2006, 23:27 UTC
Message-ID
<7voe13exoq.fsf@assigned-by-dhcp.cox.net>

I'll be sending out three experimental patches that would come on top of "next". With them, you should be able to:

	$ git send-pack --thin other/repo/sitory

and it would send deltified representation based on things not in the transferred data.

This is somewhat experimental, although I tried it myself and it seems to work with my limited test. Do not push into your production repository with it yet, but please do try it out.

How does it work?
"git send-pack" works by:
 (1) negotiating with the other end to find out what common
     commits our repository and the other one has;
 (2) computing the list of objects to send to the other end by
     running
     "git-rev-list --objects $heads `git-rev-parse --not $commons`"
     ($heads are what we are going to send, $commons are what
     they already have).
 (3) feeding (2) to git-pack-object --stdout, sending the result
     to the other end.
 (4) invoke git-receive-pack on the other end and have it read
     the output from (3), which will feed git-unpack-objects on
     the other end.

In general, the packfile is designed to be "self contained". This is necessary in case we need to deal with more than one huge packfiles that we can mmap only one at a time -- we guarantee that the base object of a deltified object is found while unpacking that deltified object because the base object can always be found in the same pack.

However, during send-pack/receive-pack transfer, we will unpack the resulting packfile on the other end into loose objects, so it is not strictly necessary to require self-containedness to the packfile used for the transfer.

Next: Martin Langhoff
Message 1 of 2 in “Delta-transfer using thin-pack”
  1. Junio C HamanoFeb 19, 2006
  2. Martin LanghoffFeb 21, 2006

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.