mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
3421cb56a8
commit
14aaf5c9d8
2
midx.c
2
midx.c
@@ -460,7 +460,7 @@ int prepare_midx_pack(struct multi_pack_index *m,
|
||||
strbuf_addbuf(&key, &pack_name);
|
||||
strbuf_strip_suffix(&key, ".idx");
|
||||
strbuf_addstr(&key, ".pack");
|
||||
p = hashmap_get_entry_from_hash(&r->objects->pack_map,
|
||||
p = hashmap_get_entry_from_hash(&r->objects->packfiles->map,
|
||||
strhash(key.buf), key.buf,
|
||||
struct packed_git, packmap_ent);
|
||||
if (!p) {
|
||||
|
||||
Reference in New Issue
Block a user