{"thread":{"id":"65312","subject":"Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","startedAt":"2026-03-19T22:52:16Z","lastAt":"2026-03-20T06:14:29Z","messageCount":6,"participants":["Ramsay Jones","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"539444","messageId":"97c623fe-4e03-4fbe-a6af-9c01c101bae4@ramsayjones.plus.com","threadId":"65312","inReplyTo":null,"subject":"Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2026-03-19T22:49:06Z","receivedAt":"2026-03-19T22:52:16Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Patrick,\n\nWhen you next re-roll your 'ps/object-counting' branch, could you please squash this\ninto the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\nobjects\",2026-03-12) in tonight's 'seen' branch.\n\nThanks,\n\nATB,\nRamsay Jones\n\n\n object-file.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/object-file.c b/object-file.c\nindex 35be7e58cb..3708b8f18d 100644\n--- a/object-file.c\n+++ b/object-file.c\n@@ -1941,7 +1941,7 @@ int odb_source_loose_count_objects(struct odb_source *source,\n \t} else {\n \t\t*out = 0;\n \t\tret = odb_source_loose_for_each_object(source, NULL, count_loose_object,\n-\t\t\t\t\t\t       out, 0);\n+\t\t\t\t\t\t       out, NULL);\n \t}\n \n out:\n-- \n2.53.0\n"},{"id":"539462","messageId":"xmqqqzpfgu5s.fsf@gitster.g","threadId":"65312","inReplyTo":"97c623fe-4e03-4fbe-a6af-9c01c101bae4@ramsayjones.plus.com","subject":"Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-20T01:35:11Z","receivedAt":"2026-03-20T01:35:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Patrick,\n>\n> When you next re-roll your 'ps/object-counting' branch, could you please squash this\n> into the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\n> objects\",2026-03-12) in tonight's 'seen' branch.\n\nThe topic being in 'next' since March 17th, that is a bit awkward to\narrange.  I can queue the fix on top instead.\n\n>\n> Thanks,\n>\n> ATB,\n> Ramsay Jones\n>\n>\n>  object-file.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/object-file.c b/object-file.c\n> index 35be7e58cb..3708b8f18d 100644\n> --- a/object-file.c\n> +++ b/object-file.c\n> @@ -1941,7 +1941,7 @@ int odb_source_loose_count_objects(struct odb_source *source,\n>  \t} else {\n>  \t\t*out = 0;\n>  \t\tret = odb_source_loose_for_each_object(source, NULL, count_loose_object,\n> -\t\t\t\t\t\t       out, 0);\n> +\t\t\t\t\t\t       out, NULL);\n>  \t}\n>  \n>  out:\n"},{"id":"539466","messageId":"b2656d8c-7878-489e-a78b-ecb441570bf6@ramsayjones.plus.com","threadId":"65312","inReplyTo":"xmqqqzpfgu5s.fsf@gitster.g","subject":"Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2026-03-20T02:04:34Z","receivedAt":"2026-03-20T02:07:45Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 20/03/2026 1:35 am, Junio C Hamano wrote:\n> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n> \n>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n>> ---\n>>\n>> Hi Patrick,\n>>\n>> When you next re-roll your 'ps/object-counting' branch, could you please squash this\n>> into the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\n>> objects\",2026-03-12) in tonight's 'seen' branch.\n> \n> The topic being in 'next' since March 17th, that is a bit awkward to\n> arrange.  I can queue the fix on top instead.\n\nHmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight\n(and I built git yesterday - master, next and seen), so I just assumed ... ;)\n\nSorry about that.\n\nThanks.\n\nATB,\nRamsay Jones\n\n\n"},{"id":"539467","messageId":"12187836-0b2d-4e82-ae0c-4da972aee7e7@ramsayjones.plus.com","threadId":"65312","inReplyTo":"b2656d8c-7878-489e-a78b-ecb441570bf6@ramsayjones.plus.com","subject":"Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2026-03-20T03:44:08Z","receivedAt":"2026-03-20T03:44:12Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nOn 20/03/2026 02:04, Ramsay Jones wrote:\n>\n> On 20/03/2026 1:35 am, Junio C Hamano wrote:\n>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n>>\n>>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n>>> ---\n>>>\n>>> Hi Patrick,\n>>>\n>>> When you next re-roll your 'ps/object-counting' branch, could you please squash this\n>>> into the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\n>>> objects\",2026-03-12) in tonight's 'seen' branch.\n>> The topic being in 'next' since March 17th, that is a bit awkward to\n>> arrange.  I can queue the fix on top instead.\n> Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight\n> (and I built git yesterday - master, next and seen), so I just assumed ... ;)\n>\n> Sorry about that.\n>\n\nHeh, I could not sleep, so took another look! :)\n\n\nThe problem was actually caused by the \n'ps/odb-generic-object-name-handling' branch and commit 936c2bfecb \n(\"odb: introduce\n\n`struct odb_for_each_object_options`\", 2026-03-19). In particular,  that \ncommit changes the type of the last parameter of the\n\nodb_source_loose_for_each_object() function from 'unsigned' to 'const \nstruct odb_for_each_object_options *', without\n\nchanging one call site from '0' to 'NULL'.\n\n\nOK, I can go to bed now!\n\n\nThanks.\n\n\nATB,\n\nRamsay Jones\n\n\n"},{"id":"539473","messageId":"xmqqy0jnf323.fsf@gitster.g","threadId":"65312","inReplyTo":"b2656d8c-7878-489e-a78b-ecb441570bf6@ramsayjones.plus.com","subject":"Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-20T06:05:56Z","receivedAt":"2026-03-20T06:05:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n> On 20/03/2026 1:35 am, Junio C Hamano wrote:\n>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n>> \n>>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n>>> ---\n>>>\n>>> Hi Patrick,\n>>>\n>>> When you next re-roll your 'ps/object-counting' branch, could you please squash this\n>>> into the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\n>>> objects\",2026-03-12) in tonight's 'seen' branch.\n>> \n>> The topic being in 'next' since March 17th, that is a bit awkward to\n>> arrange.  I can queue the fix on top instead.\n>\n> Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight\n> (and I built git yesterday - master, next and seen), so I just assumed ... ;)\n>\n> Sorry about that.\n\nFWIW, my local build & test did not catch this until today, only\nbecause the version of sparse I was running was a tad old.  After\nupdating it today, I started seeing the breakage there.\n\n"},{"id":"539476","messageId":"abzlv_6qzZcjluic@pks.im","threadId":"65312","inReplyTo":"12187836-0b2d-4e82-ae0c-4da972aee7e7@ramsayjones.plus.com","subject":"Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-20T06:14:23Z","receivedAt":"2026-03-20T06:14:29Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, Mar 20, 2026 at 03:44:08AM +0000, Ramsay Jones wrote:\n> \n> On 20/03/2026 02:04, Ramsay Jones wrote:\n> > \n> > On 20/03/2026 1:35 am, Junio C Hamano wrote:\n> > > Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n> > > \n> > > > Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> > > > ---\n> > > > \n> > > > Hi Patrick,\n> > > > \n> > > > When you next re-roll your 'ps/object-counting' branch, could you please squash this\n> > > > into the patch equivalent to the commit 2b24db1110 (\"object-file: generalize counting\n> > > > objects\",2026-03-12) in tonight's 'seen' branch.\n> > > The topic being in 'next' since March 17th, that is a bit awkward to\n> > > arrange.  I can queue the fix on top instead.\n> > Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight\n> > (and I built git yesterday - master, next and seen), so I just assumed ... ;)\n> > \n> > Sorry about that.\n> > \n> \n> Heh, I could not sleep, so took another look! :)\n> \n> \n> The problem was actually caused by the 'ps/odb-generic-object-name-handling'\n> branch and commit 936c2bfecb (\"odb: introduce\n> \n> `struct odb_for_each_object_options`\", 2026-03-19). In particular,  that\n> commit changes the type of the last parameter of the\n> \n> odb_source_loose_for_each_object() function from 'unsigned' to 'const struct\n> odb_for_each_object_options *', without\n> \n> changing one call site from '0' to 'NULL'.\n> \n> \n> OK, I can go to bed now!\n\nThanks for catching this! Fixed locally now.\n\nPatrick\n"}]}