mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
midx: compute paths via their source
With the preceding commits we started to always have the object database source available when we load, write or access multi-pack indices. With this in place we can change how MIDX paths are computed so that we don't have to pass in the combination of a hash algorithm and object directory anymore, but only the object database source. Refactor the code accordingly. 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
7744936f37
commit
13296ac909
@@ -389,12 +389,12 @@ int load_midx_revindex(struct multi_pack_index *m)
|
||||
"source", "rev");
|
||||
|
||||
if (m->has_chain)
|
||||
get_split_midx_filename_ext(m->source->odb->repo->hash_algo, &revindex_name,
|
||||
m->source->path, get_midx_checksum(m),
|
||||
get_split_midx_filename_ext(m->source, &revindex_name,
|
||||
get_midx_checksum(m),
|
||||
MIDX_EXT_REV);
|
||||
else
|
||||
get_midx_filename_ext(m->source->odb->repo->hash_algo, &revindex_name,
|
||||
m->source->path, get_midx_checksum(m),
|
||||
get_midx_filename_ext(m->source, &revindex_name,
|
||||
get_midx_checksum(m),
|
||||
MIDX_EXT_REV);
|
||||
|
||||
ret = load_revindex_from_disk(m->source->odb->repo->hash_algo,
|
||||
|
||||
Reference in New Issue
Block a user