{"thread":{"id":"64287","subject":"[PATCH] [Outreachy] patch-ids: fix const correctness","startedAt":"2025-10-09T21:45:07Z","lastAt":"2025-10-10T00:45:47Z","messageCount":6,"participants":["Okhuomon Ajayi","Kristoffer Haugsbakk","Agatha Isabelle","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"528410","messageId":"20251009214445.1190274-1-okhuomonajayi54@gmail.com","threadId":"64287","inReplyTo":null,"subject":"[PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2025-10-09T21:44:45Z","receivedAt":"2025-10-09T21:45:07Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"Fix const correctness warning in patch_id_neq() in patch-ids.c.\n---\n patch-ids.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/patch-ids.c b/patch-ids.c\nindex a5683b462c..4a72c2cbe6 100644\n--- a/patch-ids.c\n+++ b/patch-ids.c\n@@ -42,7 +42,7 @@ static int patch_id_neq(const void *cmpfn_data,\n \t\t\tconst void *keydata UNUSED)\n {\n \t/* NEEDSWORK: const correctness? */\n-\tstruct diff_options *opt = (void *)cmpfn_data;\n+\tconst struct diff_options *opt = (void *)cmpfn_data;\n \tstruct patch_id *a, *b;\n \n \ta = container_of(eptr, struct patch_id, ent);\n-- \n2.43.0\n\n"},{"id":"528411","messageId":"a299c0ea-8eeb-4a21-9924-ebd7c6f6e0bd@app.fastmail.com","threadId":"64287","inReplyTo":"20251009214445.1190274-1-okhuomonajayi54@gmail.com","subject":"Re: [PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-10-09T21:46:48Z","receivedAt":"2025-10-09T21:47:09Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Oct 9, 2025, at 23:44, Okhuomon Ajayi wrote:\n> Fix const correctness warning in patch_id_neq() in patch-ids.c.\n> ---\n>  patch-ids.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/patch-ids.c b/patch-ids.c\n> index a5683b462c..4a72c2cbe6 100644\n> --- a/patch-ids.c\n> +++ b/patch-ids.c\n> @@ -42,7 +42,7 @@ static int patch_id_neq(const void *cmpfn_data,\n>  \t\t\tconst void *keydata UNUSED)\n>  {\n>  \t/* NEEDSWORK: const correctness? */\n> -\tstruct diff_options *opt = (void *)cmpfn_data;\n> +\tconst struct diff_options *opt = (void *)cmpfn_data;\n>  \tstruct patch_id *a, *b;\n> \n>  \ta = container_of(eptr, struct patch_id, ent);\n> -- \n> 2.43.0\n\nCan’t the comment be removed now, though? If the cmit msg. says “Fix”.\n"},{"id":"528423","messageId":"20251009215737.1196464-1-okhuomonajayi54@gmail.com","threadId":"64287","inReplyTo":"20251009214445.1190274-1-okhuomonajayi54@gmail.com","subject":"[PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2025-10-09T21:57:20Z","receivedAt":"2025-10-09T21:58:02Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"Fix const correctness warning in patch_id_neq() in patch-ids.c.\n\nChanges in v2:\n- Removed NEEDSWORK comment\n---\n patch-ids.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/patch-ids.c b/patch-ids.c\nindex a5683b462c..b6b808332f 100644\n--- a/patch-ids.c\n+++ b/patch-ids.c\n@@ -41,8 +41,8 @@ static int patch_id_neq(const void *cmpfn_data,\n \t\t\tconst struct hashmap_entry *entry_or_key,\n \t\t\tconst void *keydata UNUSED)\n {\n-\t/* NEEDSWORK: const correctness? */\n-\tstruct diff_options *opt = (void *)cmpfn_data;\n+\t\n+\tconst struct diff_options *opt = (void *)cmpfn_data;\n \tstruct patch_id *a, *b;\n \n \ta = container_of(eptr, struct patch_id, ent);\n-- \n2.43.0\n\n"},{"id":"528436","messageId":"6n5vp3vkmk6gota27baejwu2mkuqppy65efsiimvjqnhjjqecz@uud5yaetl5l2","threadId":"64287","inReplyTo":"20251009215737.1196464-1-okhuomonajayi54@gmail.com","subject":"Re: [PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Agatha Isabelle","fromEmail":"code@agatha.dev","sentAt":"2025-10-09T23:49:48Z","receivedAt":"2025-10-09T23:55:14Z","isPatch":true,"sender":{"key":"code@agatha.dev","avatar":null},"body":"Hello!\n\nNice patch!\n\nOne detail I would add, though, I think the correct way to submit a v2\npatch is to prefix it with the `[PATCH v2]` prefix.\n\nSee:\nhttps://git-scm.com/docs/SubmittingPatches\nhttps://git-scm.com/docs/MyFirstContribution\n\nOn Thu, Oct 09, 2025 at 10:57:20PM +0100, Okhuomon Ajayi wrote:\n> Fix const correctness warning in patch_id_neq() in patch-ids.c.\n> \n\nBefore the changes, I think there must be the `Signed-off-by:` line.\n\n> Changes in v2:\n> - Removed NEEDSWORK comment\n\nAnd this part of the message, the changelog, I think it's supposed to be\nin the email message but not as part of the commit log.\n\n> ---\n>  patch-ids.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/patch-ids.c b/patch-ids.c\n> index a5683b462c..b6b808332f 100644\n> --- a/patch-ids.c\n> +++ b/patch-ids.c\n> @@ -41,8 +41,8 @@ static int patch_id_neq(const void *cmpfn_data,\n>  \t\t\tconst struct hashmap_entry *entry_or_key,\n>  \t\t\tconst void *keydata UNUSED)\n>  {\n> -\t/* NEEDSWORK: const correctness? */\n> -\tstruct diff_options *opt = (void *)cmpfn_data;\n> +\t\n> +\tconst struct diff_options *opt = (void *)cmpfn_data;\n>  \tstruct patch_id *a, *b;\n>  \n>  \ta = container_of(eptr, struct patch_id, ent);\n> -- \n> 2.43.0\n> \n\nI hope it was helpful.\n\nBest,\nÁgatha Isabelle\n"},{"id":"528439","messageId":"CAFpMFfAvSrm=LGdCkuui2aZoZW5+cq=8Hk1pug=1GB=ZRreuiQ@mail.gmail.com","threadId":"64287","inReplyTo":"6n5vp3vkmk6gota27baejwu2mkuqppy65efsiimvjqnhjjqecz@uud5yaetl5l2","subject":"Re: [PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2025-10-10T00:13:21Z","receivedAt":"2025-10-10T00:13:35Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"Thank you Agatha\n\nOn Fri, Oct 10, 2025 at 12:49 AM Agatha Isabelle <code@agatha.dev> wrote:\n>\n> Hello!\n>\n> Nice patch!\n>\n> One detail I would add, though, I think the correct way to submit a v2\n> patch is to prefix it with the `[PATCH v2]` prefix.\n>\n> See:\n> https://git-scm.com/docs/SubmittingPatches\n> https://git-scm.com/docs/MyFirstContribution\n>\n> On Thu, Oct 09, 2025 at 10:57:20PM +0100, Okhuomon Ajayi wrote:\n> > Fix const correctness warning in patch_id_neq() in patch-ids.c.\n> >\n>\n> Before the changes, I think there must be the `Signed-off-by:` line.\n>\n> > Changes in v2:\n> > - Removed NEEDSWORK comment\n>\n> And this part of the message, the changelog, I think it's supposed to be\n> in the email message but not as part of the commit log.\n>\n> > ---\n> >  patch-ids.c | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/patch-ids.c b/patch-ids.c\n> > index a5683b462c..b6b808332f 100644\n> > --- a/patch-ids.c\n> > +++ b/patch-ids.c\n> > @@ -41,8 +41,8 @@ static int patch_id_neq(const void *cmpfn_data,\n> >                       const struct hashmap_entry *entry_or_key,\n> >                       const void *keydata UNUSED)\n> >  {\n> > -     /* NEEDSWORK: const correctness? */\n> > -     struct diff_options *opt = (void *)cmpfn_data;\n> > +\n> > +     const struct diff_options *opt = (void *)cmpfn_data;\n> >       struct patch_id *a, *b;\n> >\n> >       a = container_of(eptr, struct patch_id, ent);\n> > --\n> > 2.43.0\n> >\n>\n> I hope it was helpful.\n>\n> Best,\n> Ágatha Isabelle\n"},{"id":"528443","messageId":"xmqqwm53bn47.fsf@gitster.g","threadId":"64287","inReplyTo":"a299c0ea-8eeb-4a21-9924-ebd7c6f6e0bd@app.fastmail.com","subject":"Re: [PATCH] [Outreachy] patch-ids: fix const correctness","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-10-10T00:45:44Z","receivedAt":"2025-10-10T00:45:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> On Thu, Oct 9, 2025, at 23:44, Okhuomon Ajayi wrote:\n>> Fix const correctness warning in patch_id_neq() in patch-ids.c.\n>> ---\n>>  patch-ids.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/patch-ids.c b/patch-ids.c\n>> index a5683b462c..4a72c2cbe6 100644\n>> --- a/patch-ids.c\n>> +++ b/patch-ids.c\n>> @@ -42,7 +42,7 @@ static int patch_id_neq(const void *cmpfn_data,\n>>  \t\t\tconst void *keydata UNUSED)\n>>  {\n>>  \t/* NEEDSWORK: const correctness? */\n>> -\tstruct diff_options *opt = (void *)cmpfn_data;\n>> +\tconst struct diff_options *opt = (void *)cmpfn_data;\n>>  \tstruct patch_id *a, *b;\n>> \n>>  \ta = container_of(eptr, struct patch_id, ent);\n>> -- \n>> 2.43.0\n>\n> Can’t the comment be removed now, though? If the cmit msg. says “Fix”.\n\nAnd the proposed commit log message should describe what the problem\nis, why it matters, and how the updated code is better than the\ncurrent state of the code.\n"}]}