aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.h
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 /packfile.h
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 'packfile.h')
-rw-r--r--packfile.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h
index 0b691ded7e..1afb9cd664 100644
--- a/packfile.h
+++ b/packfile.h
@@ -143,6 +143,12 @@ void packfile_store_add_pack(struct packfile_store *store,
struct packed_git *packfile_store_get_packs(struct packfile_store *store);
/*
+ * Get all packs managed by the given store, including packfiles that are
+ * referenced by multi-pack indices.
+ */
+struct packed_git *packfile_store_get_all_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.
@@ -227,7 +233,6 @@ int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
extern void (*report_garbage)(unsigned seen_bits, const char *path);
struct list_head *get_packed_git_mru(struct repository *r);
-struct packed_git *get_all_packs(struct repository *r);
/*
* Give a rough count of objects in the repository. This sacrifices accuracy