midx: pass down hash_algo
to functions using global variables
The functions `get_split_midx_filename_ext()`, `get_midx_filename()` and `get_midx_filename_ext()` use `hash_to_hex()` which internally uses the `the_hash_algo` global variable. Remove this dependency on global variables by passing down the `hash_algo` through to the functions mentioned and instead calling `hash_to_hex_algop()` along with the obtained `hash_algo`. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d5c2ca576a
commit
f59de71cf7
@ -383,7 +383,7 @@ int load_midx_revindex(struct multi_pack_index *m)
|
||||
trace2_data_string("load_midx_revindex", the_repository,
|
||||
"source", "rev");
|
||||
|
||||
get_midx_filename_ext(&revindex_name, m->object_dir,
|
||||
get_midx_filename_ext(m->repo->hash_algo, &revindex_name, m->object_dir,
|
||||
get_midx_checksum(m), MIDX_EXT_REV);
|
||||
|
||||
ret = load_revindex_from_disk(revindex_name.buf,
|
||||
|
Reference in New Issue
Block a user