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 10, 2025, 00:45 UTC
Message-ID
<xmqqwm53bn47.fsf@gitster.g>
In-Reply-To
<a299c0ea-8eeb-4a21-9924-ebd7c6f6e0bd@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 23 quoted lines
> On Thu, Oct 9, 2025, at 23:44, Okhuomon Ajayi wrote:
>> Fix const correctness warning in patch_id_neq() in patch-ids.c.
>> ---
>>  patch-ids.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/patch-ids.c b/patch-ids.c
>> index a5683b462c..4a72c2cbe6 100644
>> --- a/patch-ids.c
>> +++ b/patch-ids.c
>> @@ -42,7 +42,7 @@ static int patch_id_neq(const void *cmpfn_data,
>>  			const void *keydata UNUSED)
>>  {
>>  	/* NEEDSWORK: const correctness? */
>> -	struct diff_options *opt = (void *)cmpfn_data;
>> +	const struct diff_options *opt = (void *)cmpfn_data;
>>  	struct patch_id *a, *b;
>> 
>>  	a = container_of(eptr, struct patch_id, ent);
>> -- 
>> 2.43.0
>
> Can’t the comment be removed now, though? If the cmit msg. says “Fix”.

And the proposed commit log message should describe what the problem is, why it matters, and how the updated code is better than the current state of the code.

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