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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2025, 17:29 UTC
Message-ID
<xmqqzf9u1zix.fsf@gitster.g>
In-Reply-To
<CAFpMFfBXhfy7ecBzR-cnGViivQG3AHGrQ00vSTnVY6OdxZPSLg@mail.gmail.com>
Okhuomon Ajayi <okhuomonajayi54@gmail.com> writes:
> 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.

If you can convince readers that changing the hashmap API is not appropriate, then I would think that would make a great explanation for a commit that removes the needswork comment without doing anything else. "Thinking about const correctness issues around this code is no longer needed. The hashmap API is right to insist that the extra data pointer must be const because .... Which makes casting constness away when assigning it to opt, which is what the code is, is indeed the only reasonable thing to do, and there is no more change necessary around here." Of course, such a commit log message must fill in the "because ..." part with a convincing argument ;-).

Thanks.
Previous: Okhuomon AjayiNext: Okhuomon Ajayi
Message 4 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.