]> git.ipfire.org Git - thirdparty/git.git/commit
pack-write: pass hash_algo to internal functions
authorKarthik Nayak <karthik.188@gmail.com>
Sun, 19 Jan 2025 11:19:30 +0000 (12:19 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jan 2025 20:36:35 +0000 (12:36 -0800)
commit8705c9bd139028aae148251420da27c9bf1c4745
tree24c21e3796f9e200583bf722a3e84e81dca986be
parent6b2aa7fd371c93df44cebff072bef193104f43f8
pack-write: pass hash_algo to internal functions

The internal functions `write_rev_trailer()`, `write_rev_trailer()`,
`write_mtimes_header()` and write_mtimes_trailer()` use the global
`the_hash_algo` variable to access the repository's hash function. Pass
the hash_algo down from callers, all of which already have access to the
variable.

This removes all global variables from the 'pack-write.c' file, so
remove the 'USE_THE_REPOSITORY_VARIABLE' macro.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-write.c