aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-15 13:29:21 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-15 12:07:29 -0700
commit736bb725ebcd37d567455db2ac50524dea11223c (patch)
tree71e35b47700022912a7d0090bf578b28b9b7cf60 /packfile.h
parentmidx: stop using linked list when closing MIDX (diff)
downloadgit-736bb725ebcd37d567455db2ac50524dea11223c.tar.gz
git-736bb725ebcd37d567455db2ac50524dea11223c.zip
packfile: refactor `get_multi_pack_index()` to work on sources
The function `get_multi_pack_index()` loads multi-pack indices via `prepare_packed_git()` and then returns the linked list of multi-pack indices that is stored in `struct object_database`. That list is in the process of being removed though in favor of storing the MIDX as part of the object database source it belongs to. Refactor `get_multi_pack_index()` so that it returns the multi-pack index for a single object source. Callers are now expected to call this function for each source they are interested in. This requires them to iterate through alternates, so we have to prepare alternate object sources before doing so. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/packfile.h b/packfile.h
index 53c3b7d3b4..f16753f2a9 100644
--- a/packfile.h
+++ b/packfile.h
@@ -147,8 +147,7 @@ void install_packed_git(struct repository *r, struct packed_git *pack);
struct packed_git *get_packed_git(struct repository *r);
struct list_head *get_packed_git_mru(struct repository *r);
-struct multi_pack_index *get_multi_pack_index(struct repository *r);
-struct multi_pack_index *get_local_multi_pack_index(struct repository *r);
+struct multi_pack_index *get_multi_pack_index(struct odb_source *source);
struct packed_git *get_all_packs(struct repository *r);
/*