Re: [PATCH v2] Document pack v4 format
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Sep 5, 2013, 17:14 UTC
- Message-ID
- <alpine.LFD.2.03.1309051311070.14472@syhkavp.arg>
- In-Reply-To
- <CACsJy8DKL9KnPAXcf+NPU_Y5J1Dz_pYxSpONN4LxcQVi1JOBYw@mail.gmail.com>
On Thu, 5 Sep 2013, Duy Nguyen wrote:
Show 14 quoted lines
> On Thu, Sep 5, 2013 at 12:39 PM, Nicolas Pitre <nico@fluxnic.net> wrote: > > Now the pack index v3 probably needs to be improved a little, again to > > accommodate completion of thin packs. Given that the main SHA1 table is > > now in the main pack file, it should be possible to still carry a small > > SHA1 table in the index file that corresponds to the appended objects > > only. This means that a SHA1 search will have to first use the main SHA1 > > table in the pack file as it is done now, and if not found then use the > > SHA1 table in the index file if it exists. And of course > > nth_packed_object_sha1() will have to be adjusted accordingly. > > What if the sender prepares the sha-1 table to contain missing objects > in advance? The sender should know what base objects are missing. Then > we only need to append objects at the receiving end and verify that > all new objects are also present in the sha-1 table.
I do like this idea very much. And that doesn't increase the thin pack size as the larger SHA1 table will be compensated by a smaller sha1ref encoding in those objects referring to the missing ones.
Nicolas