Subject: Re: [PATCH 14/16] repack: implement incremental MIDX repacking

From: Taylor Blau <[email-masked]>
Date: Tue, 21 Apr 2026 15:40:59 -0400

On Thu, Apr 16, 2026 at 03:53:10PM -0700, Elijah Newren wrote:
> Although, midx_split_factor is defined here, it isn't explicitly
> initialized anywhere.  As far as I can tell, it's only initialized
> through a designated initializer in builtin/repack.c with
> midx_split_factor not appearing as one of the designated fields and
> thus getting a value of 0.  That would result in a divide by
> zero...although, as you noted in the commit message, this code isn't
> yet active.
>
> Still, would it make sense to initialize opts.midx_split_factor in
> builtin/repack.c to something non-zero as part of this patch?

Good point. I had avoided initializing it because this code is all dead
as of this point in the series, and I didn't want to touch the repack
builtin until we actually wire it all up.

But I think the point you raise here is very fair, so I introduced the
constants in this patch and used them in the initializer, then adjust
them in the subsequent patch to use the given values instead of the
defaults.

Thanks,
Taylor