From: Junio C Hamano Date: Thu, 16 Oct 2025 20:59:21 GMT Subject: Re: [PATCH 2/8] builtin/gc: make `too_many_loose_objects()` reusable without GC config Message-ID: In-Reply-To: <20251016-pks-maintenance-geometric-strategy-v1-2-18943d474203@pks.im> Patrick Steinhardt writes: > To decide whether or not a repository needs to be repacked we estimate > the number of loose objects. If the number exceeds a certain threshold > we perform the repack, otherwise we don't. > > This is done via `too_many_loose_objects()`, which takes as parameter > the `struct gc_config`. This configuration is only used to determine the > threshold. In a subsequent commit we'll add another caller of this > function that wants to pass a different limit than the one stored in > that structure. > > Refactor the function accordingly so that we only take the limit as > parameter instead of the whole structure. Trivially correct and makes perfect sense.