aboutsummaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-09-23 12:17:14 +0200
committerJunio C Hamano <gitster@pobox.com>2025-09-24 11:53:51 -0700
commitdd52a29b78d80e425be660f3b443a42e0374a7d1 (patch)
tree31bb2e5fe7845ccc8776ff18c9b20b59d486e537 /packfile.c
parentd2779beb36ff64eb062103db14006f7ae6da5f37 (diff)
downloadgit-dd52a29b78d80e425be660f3b443a42e0374a7d1.tar.xz
packfile: refactor `get_packed_git_mru()` to work on packfile store
The `get_packed_git_mru()` function prepares the packfile store and then returns its packfiles in most-recently-used order. 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 'packfile.c')
-rw-r--r--packfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packfile.c b/packfile.c
index cd5431b6aa..5a7caec292 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1048,10 +1048,10 @@ struct packed_git *packfile_store_get_all_packs(struct packfile_store *store)
return store->packs;
}
-struct list_head *get_packed_git_mru(struct repository *r)
+struct list_head *packfile_store_get_packs_mru(struct packfile_store *store)
{
- packfile_store_prepare(r->objects->packfiles);
- return &r->objects->packfiles->mru;
+ packfile_store_prepare(store);
+ return &store->mru;
}
/*