aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-09-23 12:17:12 +0200
committerJunio C Hamano <gitster@pobox.com>2025-09-24 11:53:51 -0700
commit751808b2a18acba76b824aed4d8b7442bd7f5fca (patch)
tree7c9e46f82e6bc1e3422373947303344b303cb6c1 /packfile.c
parentab8aff4a6b2a1d5aa79deeb64bdeecc0234b4ddf (diff)
downloadgit-751808b2a18acba76b824aed4d8b7442bd7f5fca.tar.gz
packfile: refactor `get_packed_git()` to work on packfile store
The `get_packed_git()` 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 'packfile.c')
-rw-r--r--packfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packfile.c b/packfile.c
index 7a9193e5ef..b37f43afb5 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1027,10 +1027,10 @@ void packfile_store_reprepare(struct packfile_store *store)
packfile_store_prepare(store);
}
-struct packed_git *get_packed_git(struct repository *r)
+struct packed_git *packfile_store_get_packs(struct packfile_store *store)
{
- packfile_store_prepare(r->objects->packfiles);
- return r->objects->packfiles->packs;
+ packfile_store_prepare(store);
+ return store->packs;
}
struct packed_git *get_all_packs(struct repository *r)