Re: [PATCH v2 4/8] hash.h: introduce `unsafe_hash_algo()`
From: Taylor Blau <hidden>
Date: 2025-01-17 21:18:44
From: Taylor Blau <hidden>
Date: 2025-01-17 21:18:44
On Thu, Jan 16, 2025 at 12:49:56PM +0100, Patrick Steinhardt wrote:
quoted
we can instead write: struct git_hash_algo *algop = the_hash_algo; if (unsafe) algop = unsafe_hash_algo(algop); the_hash_algo->init_fn(...); the_hash_algo->update_fn(...); the_hash_algo->final_fn(...);This should all be `algop->init_fn(...)` and so on, right?
Most definitely :-).
For what it's worth, this prompted me to have another look at my proposal to stop having to use the hash algo altogether for `update()` et al, and now have a version that works. It builds on top of your patch series, which still is a step into the right direction. So I'll send it once your series is being merged down.
Exciting! I'm looking forward to reviewing it. Thanks, Taylor