Thread (4 messages) 4 messages, 2 authors, 2025-03-19

Re: [PATCH] index-pack, unpack-objects: restore missing ->init_fn

From: gtXfined H. <hidden>
Date: 2025-03-19 11:53:49

On Wed, Mar 19, 2025 at 5:32 PM Patrick Steinhardt [off-list ref] wrote:
On Tue, Mar 18, 2025 at 07:16:10PM +0800, Jensen Huang wrote:
quoted
Commit 0578f1e66a ("global: adapt callers to use generic hash context helpers")
accidentally removed `->init_fn`, which is required for OpenSSL 3+ SHA1.

This fixes the following error on fetch:
  fatal: fetch-pack: invalid index-pack output
The change makes sense indeed. I do wonder though: can we maybe improve
`git_hash_clone()` so that it is not required to initialize the context
beforehand?
Thanks for the review!
The idea of improving git_hash_clone() so that it doesn't require
explicit init_fn() calls sounds interesting. However, based on my
current understanding of the code, I'm not sure how to implement this
properly while ensuring it works correctly for all hash
implementations.
If you have any suggestions or guidance on how this could be
approached, I'd appreciate the input!

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