aboutsummaryrefslogtreecommitdiff
path: root/packfile.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-09-23 12:17:02 +0200
committerJunio C Hamano <gitster@pobox.com>2025-09-24 11:53:49 -0700
commit3421cb56a8b37425f2a47695adfa4a29a06a9d2e (patch)
tree524592b533c9a18a441862ae4ddad3fe115a96d5 /packfile.h
parent535b7a667a94d5882add829e30e20b6dfa076640 (diff)
downloadgit-3421cb56a8b37425f2a47695adfa4a29a06a9d2e.tar.xz
odb: move initialization bit into `struct packfile_store`
The object database knows to skip re-initializing the list of packfiles in case it's already been initialized. Whether or not that is the case is tracked via a separate `initialized` bit that is stored in the object database. With the introduction of the `struct packfile_store` we have a better place to host this bit though. Move it accordingly. While at it, convert the field into a boolean now that we're allowed to use them in our code base. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/packfile.h b/packfile.h
index d7ac8d24b4..cf81091175 100644
--- a/packfile.h
+++ b/packfile.h
@@ -63,6 +63,12 @@ struct packfile_store {
* the store.
*/
struct packed_git *packs;
+
+ /*
+ * Whether packfiles have already been populated with this store's
+ * packs.
+ */
+ bool initialized;
};
/*