From: Jonathan Tan Date: Wed, 08 Aug 2018 18:45:44 GMT Subject: Re: [PATCH 2/2] repack: repack promisor objects if -a or -A is set Message-ID: <20180808184544.120498-1-jonathantanmy@google.com> In-Reply-To: > But what to delta against what else is determined by the pathname > info, which is now lost by enumerating objects without tree/history > walking. By giving phoney pathnames to objects while enumerating > them in offset order and giving similar pathnames to objects closer > to each other, I was hoping that better bases will likely to be in > the same window. The order in which objects are prepared and fed to > try_delta() is "group by type, and then sort by path-hash (major > key) and size (descending order, used as minor key)", so that > the largest among similarly named blobs is stored as base and other > blobs with similar name try to become delta against that one. Thanks for the patient explanation - I think I see it now. If we enumerate in pack order and pass " " instead of "" to pack-objects in such a way that we make pack-objects sort by {type -> pack-order -> size} instead of {type -> size}, we can hopefully get better deltas. I'll write a NEEDSWORK similar to this. I'll send a reroll later today.