Thread (27 messages) flat view 27 messages, 4 authors, 2025-01-24

Re: [PATCH v2 3/5] pack-write: pass hash_algo to `write_idx_file()`

From: Karthik Nayak <hidden>
Date: 2025-01-19 11:10:40

Toon Claes [off-list ref] writes:
Karthik Nayak [off-list ref] writes:
quoted
The `write_idx_file()` function uses the global `the_hash_algo` variable
to access the repository's hash function. To avoid global variable
usage, pass the hash function from the layers above.

Since `stage_tmp_packfiles()` also resides in 'pack-write.c' and calls
`write_idx_file()`, update it to accept `the_hash_algo` as a parameter
and pass it through to the callee.
Technically speaking you're updating it to accept a `struct hash_algo`.
Yes, but also the callers pass in `the_hash_algo`. But let me amend to
make it better.
Besides from this nit, and the other nit I've submitted on the first
patch, these changes look good to me. I'm doubtful any of the comments
needs a reroll.

--
Toon
Thanks for the review! I'll re-roll with the fixes.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help