diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-09-23 12:17:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-24 11:53:51 -0700 |
| commit | 751808b2a18acba76b824aed4d8b7442bd7f5fca (patch) | |
| tree | 7c9e46f82e6bc1e3422373947303344b303cb6c1 /packfile.h | |
| parent | ab8aff4a6b2a1d5aa79deeb64bdeecc0234b4ddf (diff) | |
| download | git-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.h')
| -rw-r--r-- | packfile.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h index a9e561ac39..0b691ded7e 100644 --- a/packfile.h +++ b/packfile.h @@ -137,6 +137,12 @@ void packfile_store_add_pack(struct packfile_store *store, struct packed_git *pack); /* + * Get packs managed by the given store. Does not load the MIDX or any packs + * referenced by it. + */ +struct packed_git *packfile_store_get_packs(struct packfile_store *store); + +/* * Open the packfile and add it to the store if it isn't yet known. Returns * either the newly opened packfile or the preexisting packfile. Returns a * `NULL` pointer in case the packfile could not be opened. @@ -220,7 +226,6 @@ int for_each_packed_object(struct repository *repo, each_packed_object_fn cb, #define PACKDIR_FILE_GARBAGE 4 extern void (*report_garbage)(unsigned seen_bits, const char *path); -struct packed_git *get_packed_git(struct repository *r); struct list_head *get_packed_git_mru(struct repository *r); struct packed_git *get_all_packs(struct repository *r); |
