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 --- object-store.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'object-store.h') diff --git a/object-store.h b/object-store.h index 97f1c160e5..63b7605a3e 100644 --- a/object-store.h +++ b/object-store.h @@ -129,6 +129,12 @@ struct raw_object_store { /* A most-recently-used ordered version of the packed_git list. */ struct list_head packed_git_mru; + /* + * A linked list containing all packfiles, starting with those + * contained in the multi_pack_index. + */ + struct packed_git *all_packs; + /* * A fast, rough count of the number of objects in the repository. * These two fields are not meant for direct access. Use -- cgit v1.3-5-g45d5