aboutsummaryrefslogtreecommitdiffstats
path: root/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-09-23 12:17:03 +0200
committerJunio C Hamano <gitster@pobox.com>2025-09-24 11:53:49 -0700
commit14aaf5c9d889a4988ffc64b39fe38bd19b930a50 (patch)
treec89d06e15bbda04c6f1573389d3bc2aeb3e2f43a /odb.c
parent3421cb56a8b37425f2a47695adfa4a29a06a9d2e (diff)
downloadgit-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.c')
-rw-r--r--odb.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/odb.c b/odb.c
index 7201d01406..737d98c911 100644
--- a/odb.c
+++ b/odb.c
@@ -998,7 +998,6 @@ struct object_database *odb_new(struct repository *repo)
o->repo = repo;
o->packfiles = packfile_store_new(o);
INIT_LIST_HEAD(&o->packed_git_mru);
- hashmap_init(&o->pack_map, pack_map_entry_cmp, NULL, 0);
pthread_mutex_init(&o->replace_mutex, NULL);
string_list_init_dup(&o->submodule_source_paths);
return o;
@@ -1041,6 +1040,5 @@ void odb_clear(struct object_database *o)
packfile_store_free(o->packfiles);
o->packfiles = NULL;
- hashmap_clear(&o->pack_map);
string_list_clear(&o->submodule_source_paths, 0);
}