]> git.ipfire.org Git - thirdparty/git.git/commit
midx: pass down `hash_algo` to functions using global variables
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 27 Nov 2024 16:28:32 +0000 (17:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Dec 2024 01:32:21 +0000 (10:32 +0900)
commitf59de71cf700f9f8da27023ec8b5df117f99d9c8
treed6fea036d096b6b92fb763df8697fb24f383d9f9
parentd5c2ca576a47480b03a83821041955a21a645d1a
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>
midx-write.c
midx.c
midx.h
pack-bitmap.c
pack-revindex.c