Re: [PATCH v4 13/15] packfile: remove `get_packed_git()`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Sep 11, 2025, 23:37 UTC
- Message-ID
- <aMNdI5O96+RHbU+x@nand.local>
- In-Reply-To
- <20250909-b4-pks-packfiles-store-v4-13-151c4ba3619f@pks.im>
On Tue, Sep 09, 2025 at 01:03:12PM +0200, Patrick Steinhardt wrote:
Show 14 quoted lines
> We have two different functions to retrieve packfiles for a packfile > store: > > - `get_packed_git()` returns the list of packfiles after having called > `prepare_packed_git()`. > > - `get_all_packs()` calls `prepare_packed_git()`, as well, but also > calls `prepare_midx_pack()` for each pack. > > Based on the naming alone one might think that `get_all_packs()` would > return more packs than `get_packed_git()`. But that's not the case: both > functions end up returning the exact same list of packfiles. The real > difference between those functions is that `get_all_packs()` also loads > the info of whether or not a packfile is part of a multi-pack index.
Just reading the newer versions and catching up on some of the discussion here, I want to point out that my earlier comments here explain a case where these two functions do *not* return the same list of packs.
A future version of this series should either prepare all "get_packed_git()" callers to handle packs that are part of the MIDX, or drop this patch and address it later on.
Speaking personally, I think that there is already enough going on in this series, that punting the clean-up out to a separate series where we can discuss the implementation changes in more detail would be the way that I'd suggest approaching it.
Thanks, Taylor