From 0bff5269d3ed7124259bb3a5b33ddf2c4080b7e7 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 20 Aug 2018 16:52:02 +0000 Subject: packfile: add all_packs list If a repo contains a multi-pack-index, then the packed_git list does not contain the packfiles that are covered by the multi-pack-index. This is important for doing object lookups, abbreviations, and approximating object count. However, there are many operations that really want to iterate over all packfiles. Create a new 'all_packs' linked list that contains this list, starting with the packfiles in the multi-pack-index and then continuing along the packed_git linked list. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- packfile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'packfile.h') diff --git a/packfile.h b/packfile.h index 5abfaf2ab5..442625723d 100644 --- a/packfile.h +++ b/packfile.h @@ -51,6 +51,7 @@ extern void install_packed_git(struct repository *r, struct packed_git *pack); struct packed_git *get_packed_git(struct repository *r); struct list_head *get_packed_git_mru(struct repository *r); struct multi_pack_index *get_multi_pack_index(struct repository *r); +struct packed_git *get_all_packs(struct repository *r); /* * Give a rough count of objects in the repository. This sacrifices accuracy -- cgit v1.2.3