]> Kevux Git Server - rit/commit
packfile: refactor `prepare_packed_git_one()` to work on sources
authorPatrick Steinhardt <ps@pks.im>
Tue, 15 Jul 2025 11:29:19 +0000 (13:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2025 19:07:28 +0000 (12:07 -0700)
commitec4380f446b76e931002481f3e4be520c77058b6
treeaafaa6127563d11cc5723298a34f79bdcf9f99f1
parent4d8be89d973b69a826911385c5cf3d40d347394b
packfile: refactor `prepare_packed_git_one()` to work on sources

In the preceding commit we refactored how we load multi-pack indices to
take a corresponding "source" as input. As part of this refactoring we
started to store a pointer to the MIDX in `struct odb_source` itself.

Refactor loading of packfiles in the same way: instead of passing in the
object directory, we now pass in the source from which we want to load
packfiles. This allows us to simplify the code because we don't have to
search for a corresponding MIDX anymore, but we can instead directly use
the MIDX that we have already prepared beforehand.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c