git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
GHgtXfined H. <hmz007@gmail.com>
Date
Mar 19, 2025, 11:53 UTC
Message-ID
<CAGr7CZnNdTsUuJU+Z8HBX6wQu_HF-faDPPhuLx7u-Y=TGeop+w@mail.gmail.com>
In-Reply-To
<Z9qPMvclpdEIjQ3l@pks.im>
On Wed, Mar 19, 2025 at 5:32 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 11 quoted lines
>
> On Tue, Mar 18, 2025 at 07:16:10PM +0800, Jensen Huang wrote:
> > 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

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 5 in “index-pack, unpack-objects: restore missing ->init_fn”
  1. index-pack, unpack-objects: restore missing ->init_fnJensen Huang, Mar 18, 2025
  2. Patrick SteinhardtMar 19, 2025
  3. gtXfined H.Mar 19, 2025
  4. Patrick SteinhardtMar 19, 2025
  5. Junio C HamanoMar 21, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.