Subject: Re: A look at some alternative PACK file encodings

From: Shawn Pearce <[email-masked]>
Date: Thu, 7 Sep 2006 01:41:26 -0400

Jon Smirl <[email-masked]> wrote:
> The repack code could build a model of the tree as it is repacking,
> that is what fast-import does. If you have a model of the tree then
> when you change a TREE node you track the last sha1 that corresponded
> to that directory path. Now you know what to diff to.

Right.  But that's horribly expensive.  For the most part
pack-objects does a good job estimating this by hashing the trees
by their name and size into the same hash bucket.  And its fast.

Besides its better to store reverse deltas (like what CVS does)
as faster access to the more recent stuff is more interesting than
faster access to the older stuff.  pack-objects tries to do this
based on the order given by rev-list.

-- 
Shawn.