Subject: Re: [PATCH] repack: fix geometric repacking with gitalternates

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 12 Apr 2023 11:37:47 +0200

On Tue, Apr 11, 2023 at 05:13:12PM -0400, Taylor Blau wrote:
> On Tue, Apr 11, 2023 at 07:13:46PM +0200, Patrick Steinhardt wrote:
> > So ultimately, we would only ever write an MIDX containing only local
> > packs already. It rather feels like this is only by chance though, so I
> > think it is good to include your patch regardless of whether it actually
> > does something or not. Better be explicit here, also as documentation to
> > the reader.
> 
> Doh, this is definitely right. I even wrote that code a while ago; shows
> you how good my memory is ;-).
> 
> FWIW, I agree that even though it doesn't do anything in this instance,
> it is a good safeguard to have in place, so I think including it in your
> series is the right thing to do.

I was wrong, it actually does fix a problem, just not the one we thought
it would fix. When all packfiles are non-local, git-multi-pack-index(1)
would end up returning an error because it cannot find any of them. So
by skipping over these non-local packfiles early on we avoid spawning
it altogether and thus avoid the error.

Partick