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

Re: [PATCH] [Outreachy] patch-ids: fix const correctness

From
OAOkhuomon Ajayi <okhuomonajayi54@gmail.com>
Date
Oct 13, 2025, 17:22 UTC
Message-ID
<CAFpMFfBXhfy7ecBzR-cnGViivQG3AHGrQ00vSTnVY6OdxZPSLg@mail.gmail.com>
In-Reply-To
<xmqq4is23evz.fsf@gitster.g>
Thanks, that explains it.

I didn’t compile test before sending my mistake. I see now that opt is passed into commit_patch_id() (and friends) and those functions modify the diff_options structure, so making opt const is incorrect. The real issue is the mismatch introduced by the hashmap API declaring cmpfn_data as const void *, which is what the NEEDSWORK comment was flagging.

I’ll revert my local change, run a build and tests, and then think about safer alternatives (or leave the NEEDSWORK comment in place if changing the hashmap API isn’t appropriate). Thanks for the clarification.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “[Outreachy] patch-ids: fix const correctness”
  1. [Outreachy] patch-ids: fix const correctnessOkhuomon Ajayi, Oct 13, 2025
  2. Junio C HamanoOct 13, 2025
  3. Okhuomon AjayiOct 13, 2025
  4. Junio C HamanoOct 13, 2025
  5. Okhuomon AjayiOct 13, 2025
  6. Junio C HamanoOct 13, 2025
  7. Okhuomon AjayiOct 13, 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.