Re: [RFC PATCH] multi-pack-index: allow operating without pack files
- From
Johannes Berg <johannes@sipsolutions.net>
- Date
- Aug 23, 2021, 08:23 UTC
- Message-ID
- <3505a827a42096938746691acf4b1a2f5bf9d04f.camel@sipsolutions.net>
- In-Reply-To
- <YSMenndGYr14okwv@nand.local>
On Mon, 2021-08-23 at 00:05 -0400, Taylor Blau wrote:
Show 5 quoted lines
> > We're going to run into problems much earlier than that, though: the > MIDX needs to load information about objects from packs in order to > break ties when multiple copies of the same object exist in multiple > packs (according to that pack's mtime).
Huh, I guess I never ran into a need - we make sure in bup that each object only exists once, that's kind of the point :)
I guess we could break ties by "lower hash of the pack" instead of "mtime"? It doesn't really matter how they're broken, as long as it's consistent?
Arguably, mtime is not a good measure anyway, since the same repo elsewhere would have different mtimes.
> So I'm not sure how we would even write a MIDX without physical packs on > disk that we can open and stat, let along how we would teach Git to > handle a situation where packs that did exist when writing a MIDX went > away when we tried to read from the same MIDX later on.
It handles that just fine on the read side.
johannes