Re: [PATCH 00/23] Preliminary pack v4 support
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 28, 2013, 03:06 UTC
- Message-ID
- <CACsJy8DAeeUrkUw6A28suLq4VoHjt-k3Wd8SLHWcjxr85A0c2g@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.03.1308272241470.14472@syhkavp.arg>
On Wed, Aug 28, 2013 at 9:58 AM, Nicolas Pitre <nico@fluxnic.net> wrote:
Show 6 quoted lines
>> But what if we store >> appended objects in OBJ_REF_DELTA format where base ref is empty >> tree/commit and cached by sha1_file.c? > > I don't follow you here. Missing objects need to be added to the pack, > they can't be cached anywhere.
I use ref-delta as an alternate escape hatch to store missing commits and trees in unparsed format. In order to do that, I need a base ref SHA-1 and we can create and store SHA-1 of empty commit and emptry tree in sha1_file.c (because empty commit is not in a valid format and can't be parsed and stored in v3). So the result pack is still "thin" but it should only lack at most two objects: empty commit and empty tree. Thinking again this is much uglier than escape hatches to v3 tables..
-- Duy