aboutsummaryrefslogtreecommitdiffstats
path: root/server-info.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-09-23 12:17:13 +0200
committerJunio C Hamano <gitster@pobox.com>2025-09-24 11:53:51 -0700
commitd2779beb36ff64eb062103db14006f7ae6da5f37 (patch)
tree45f56f67f53b9c957f62af0855a9b826cc978c73 /server-info.c
parent751808b2a18acba76b824aed4d8b7442bd7f5fca (diff)
downloadgit-d2779beb36ff64eb062103db14006f7ae6da5f37.tar.gz
packfile: refactor `get_all_packs()` to work on packfile store
The `get_all_packs()` function prepares the packfile store and then returns its packfiles. Refactor it to accept a packfile store instead of a repository to clarify its scope. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'server-info.c')
-rw-r--r--server-info.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server-info.c b/server-info.c
index 9bb30d9ab7..1d33de821e 100644
--- a/server-info.c
+++ b/server-info.c
@@ -287,12 +287,13 @@ static int compare_info(const void *a_, const void *b_)
static void init_pack_info(struct repository *r, const char *infofile, int force)
{
+ struct packfile_store *packs = r->objects->packfiles;
struct packed_git *p;
int stale;
int i;
size_t alloc = 0;
- for (p = get_all_packs(r); p; p = p->next) {
+ for (p = packfile_store_get_all_packs(packs); p; p = p->next) {
/* we ignore things on alternate path since they are
* not available to the pullers in general.
*/