diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-09-23 12:17:03 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-24 11:53:49 -0700 |
| commit | 14aaf5c9d889a4988ffc64b39fe38bd19b930a50 (patch) | |
| tree | c89d06e15bbda04c6f1573389d3bc2aeb3e2f43a /odb.h | |
| parent | 3421cb56a8b37425f2a47695adfa4a29a06a9d2e (diff) | |
| download | git-14aaf5c9d889a4988ffc64b39fe38bd19b930a50.tar.gz | |
odb: move packfile map into `struct packfile_store`
The object database tracks a map of packfiles by their respective paths,
which is used to figure out whether a given packfile has already been
loaded. With the introduction of the `struct packfile_store` we have a
better place to host this list though.
Move the map accordingly.
`pack_map_entry_cmp()` isn't used anywhere but in "packfile.c" anymore
after this change, so we convert it to a static function, as well. Note
that we also drop the `inline` hint: the function is used as a callback
function exclusively, and callbacks cannot be inlined.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.h')
| -rw-r--r-- | odb.h | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -135,7 +135,7 @@ struct object_database { /* * private data * - * should only be accessed directly by packfile.c + * Should only be accessed directly by packfile.c and midx.c. */ struct packfile_store *packfiles; /* A most-recently-used ordered version of the packed_git list. */ @@ -156,12 +156,6 @@ struct object_database { size_t cached_object_nr, cached_object_alloc; /* - * A map of packfiles to packed_git structs for tracking which - * packs have been loaded already. - */ - struct hashmap pack_map; - - /* * A fast, rough count of the number of objects in the repository. * These two fields are not meant for direct access. Use * repo_approximate_object_count() instead. |
