Re: CAREFUL! No more delta object support!
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:00
On Tue, 28 Jun 2005, Linus Torvalds wrote:
Oh, you'd never just transfer the whole big pack-file at all: you'd just create a new one. And creatign a new one is just a matter of finding the common parent, and then doing git-rev-list --objects common..HEAD | git-pack-file .git/tmp-pack and then you send the result to the other side..
To clarify: this also works with objects that are already in another pack-file (now that Junio fixed the "get size of a deltified packed entry"), so you can have any number of unpacked objects in your objects directory, _and_ a pack-file (or several), and you can generate a new temporary pack-file just for sending somewhere else that contains arbistrary parts of that (ie a mix of objects that are in your "main" packfiles and objects that are unpacked). You don't have to use "git-rev-list" to generate the objects, btw, git-pack-file takes an arbitrary list of object ID's (plus a "packing hint" in the form of a filename that is not required, but that can help the packing heuristics, and that git-rev-list does provide). I'll also fix up git-pack-file to be able to pack tag objects (and the unpacking to understand them), so that any valid object can be packed. Right now it only handles the objects that git-rev-list knows about. Linus