{"thread":{"id":"64365","subject":"[BUG] Strange git notes completion behaviour","startedAt":"2025-10-21T21:06:57Z","lastAt":"2025-10-24T20:16:40Z","messageCount":12,"participants":["rsbecker@nexbridge.com","D. Ben Knoble","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"529327","messageId":"012601dc42ce$a1adcb50$e50961f0$@nexbridge.com","threadId":"64365","inReplyTo":null,"subject":"[BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-21T21:06:50Z","receivedAt":"2025-10-21T21:06:57Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi All,\n\nI tried the following in git 2.51.0 on NonStop (big endian x86):\n\ngit notes add -m \"Test Note\" HEAD\ngit notes show HEAD\n\nThe git notes show reports a completion code of 037777777764 (-12). This\ngets\nhidden by bash, which truncates negative results so it shows as 0, not -12.\nThis\nonly seems to happen in git notes show, not any other commands or\nsub-commands. I checked in gdb and this is in fact happening. Anywhere I can\nlook to try to find where this is failing?\n\n--Randall\n\n"},{"id":"529331","messageId":"CALnO6CD8JU2qMCnC=qQmNOV6Wy1ZnveT3tRxUz1E0LVMj5oU9w@mail.gmail.com","threadId":"64365","inReplyTo":"012601dc42ce$a1adcb50$e50961f0$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-10-21T21:32:42Z","receivedAt":"2025-10-21T21:32:54Z","isPatch":false,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Tue, Oct 21, 2025 at 5:07 PM <rsbecker@nexbridge.com> wrote:\n>\n> Hi All,\n>\n> I tried the following in git 2.51.0 on NonStop (big endian x86):\n>\n> git notes add -m \"Test Note\" HEAD\n> git notes show HEAD\n>\n> The git notes show reports a completion code of 037777777764 (-12). This\n> gets\n> hidden by bash, which truncates negative results so it shows as 0, not -12.\n> This\n> only seems to happen in git notes show, not any other commands or\n> sub-commands. I checked in gdb and this is in fact happening. Anywhere I can\n> look to try to find where this is failing?\n>\n> --Randall\n\nExit code or shell (tab) completion? I'm a bit confused, so maybe\nsomeone else is, too.\n\n-- \nD. Ben Knoble\n"},{"id":"529338","messageId":"013201dc42d5$07a71550$16f53ff0$@nexbridge.com","threadId":"64365","inReplyTo":"CALnO6CD8JU2qMCnC=qQmNOV6Wy1ZnveT3tRxUz1E0LVMj5oU9w@mail.gmail.com","subject":"RE: [BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-21T21:52:38Z","receivedAt":"2025-10-21T21:52:46Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On October 21, 2025 5:33 PM, D. Ben Knoble wrote:\n>On Tue, Oct 21, 2025 at 5:07 PM <rsbecker@nexbridge.com> wrote:\n>>\n>> Hi All,\n>>\n>> I tried the following in git 2.51.0 on NonStop (big endian x86):\n>>\n>> git notes add -m \"Test Note\" HEAD\n>> git notes show HEAD\n>>\n>> The git notes show reports a completion code of 037777777764 (-12).\n>> This gets hidden by bash, which truncates negative results so it shows\n>> as 0, not -12.\n>> This\n>> only seems to happen in git notes show, not any other commands or\n>> sub-commands. I checked in gdb and this is in fact happening. Anywhere\n>> I can look to try to find where this is failing?\n>>\n>> --Randall\n>\n>Exit code or shell (tab) completion? I'm a bit confused, so maybe someone else is,\n>too.\n\nIt is the exit code. When in gdb, the return from notes is -12 as above. By the time\nIt gets back to bash, the lower bytes are dropped so I end up with a 0xFF, which\nbash thinks is a 0, so the exit code is hidden from view. I tried the !!fn construct\nin a standard alone test program with no wisdom gained.\n\n"},{"id":"529404","messageId":"20251022092708.GE853931@coredump.intra.peff.net","threadId":"64365","inReplyTo":"013201dc42d5$07a71550$16f53ff0$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-10-22T09:27:08Z","receivedAt":"2025-10-22T09:27:10Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 21, 2025 at 05:52:38PM -0400, rsbecker@nexbridge.com wrote:\n\n> It is the exit code. When in gdb, the return from notes is -12 as above. By the time\n> It gets back to bash, the lower bytes are dropped so I end up with a 0xFF, which\n> bash thinks is a 0, so the exit code is hidden from view. I tried the !!fn construct\n> in a standard alone test program with no wisdom gained.\n\nI don't think the \"!!fn()\" line ever returns here. In the show()\nfunction of builtin/notes.c (which is what \"fn\" is pointing to for \"git\nnotes show\"), we end up calling execv_git_cmd() to run \"git show\". So\nyou are really seeing the exit code of something like:\n\n  git show $(git notes list HEAD)\n\nThat in turn is propagating the return from show_blob_object(). Which\nI'd think would return \"0\" here, since it actually showed the blob,\nthough it does look like it could return -1 in a few cases.\n\nAnother possible point of confusion: that git-show invocation will run a\npager. It's been a long time since I've looked at that code, but IIRC we\ntry to preserve the exit code of the actual Git command (rather than the\npager). But you might try:\n\n  git --no-pager notes show HEAD\n\nto see if that behaves differently. I couldn't reproduce the issue at\nall on my end.\n\n-Peff\n"},{"id":"529420","messageId":"018701dc435f$f1dc1a00$d5944e00$@nexbridge.com","threadId":"64365","inReplyTo":"20251022092708.GE853931@coredump.intra.peff.net","subject":"RE: [BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-22T14:27:01Z","receivedAt":"2025-10-22T14:27:12Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On October 22, 2025 5:27 AM, Jeff King wrote:\n>On Tue, Oct 21, 2025 at 05:52:38PM -0400, rsbecker@nexbridge.com wrote:\n>\n>> It is the exit code. When in gdb, the return from notes is -12 as\n>> above. By the time It gets back to bash, the lower bytes are dropped\n>> so I end up with a 0xFF, which bash thinks is a 0, so the exit code is\n>> hidden from view. I tried the !!fn construct in a standard alone test program with\n>no wisdom gained.\n>\n>I don't think the \"!!fn()\" line ever returns here. In the show() function of\n>builtin/notes.c (which is what \"fn\" is pointing to for \"git notes show\"), we end up\n>calling execv_git_cmd() to run \"git show\". So you are really seeing the exit code of\n>something like:\n>\n>  git show $(git notes list HEAD)\n>\n>That in turn is propagating the return from show_blob_object(). Which I'd think\n>would return \"0\" here, since it actually showed the blob, though it does look like it\n>could return -1 in a few cases.\n>\n>Another possible point of confusion: that git-show invocation will run a pager. It's\n>been a long time since I've looked at that code, but IIRC we try to preserve the exit\n>code of the actual Git command (rather than the pager). But you might try:\n>\n>  git --no-pager notes show HEAD\n>\n>to see if that behaves differently. I couldn't reproduce the issue at all on my end.\n\nI tried running with --no-pager. No difference. Interesting:\n\ngit show $(git notes list HEAD)\n\nworks correctly with no error report (from inside gdb), while the run of\n\ngit --no-pager notes show HEAD\n\nstill reports:\nRun till exit from #0  main (argc=5, argv=0x811d000)\n    at /home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/common-main.c:8\nProcess (0,896) exited with code 037777777764.\n\nIs there a path where just an implied return is used? I have seen the optimizer\nreturn whatever is in an x86 register - rsx and rsi are both 12 at git.c:982\n- on occasion.\n\n\n\n"},{"id":"529500","messageId":"20251023124837.GB1163932@coredump.intra.peff.net","threadId":"64365","inReplyTo":"018701dc435f$f1dc1a00$d5944e00$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-10-23T12:48:37Z","receivedAt":"2025-10-23T12:48:38Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 22, 2025 at 10:27:01AM -0400, rsbecker@nexbridge.com wrote:\n\n> I tried running with --no-pager. No difference. Interesting:\n> \n> git show $(git notes list HEAD)\n> \n> works correctly with no error report (from inside gdb), while the run of\n> \n> git --no-pager notes show HEAD\n> \n> still reports:\n> Run till exit from #0  main (argc=5, argv=0x811d000)\n>     at /home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/common-main.c:8\n> Process (0,896) exited with code 037777777764.\n> \n> Is there a path where just an implied return is used? I have seen the optimizer\n> return whatever is in an x86 register - rsx and rsi are both 12 at git.c:982\n> - on occasion.\n\nNot that I know of (and I'd expect the compiler to complain if we ever\nhad a code path that didn't return).  It is weird that git-show produces\nthe right exit code, but our execvp() of it does not. In your place I\nguess I'd try walking through the debugger all the way down to the exec\nsystem call (and ideally convincing the debugger to keep going in the\nexec'd process image).\n\n-Peff\n"},{"id":"529626","messageId":"029a01dc450c$4318dfe0$c94a9fa0$@nexbridge.com","threadId":"64365","inReplyTo":"20251023124837.GB1163932@coredump.intra.peff.net","subject":"RE: [BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-24T17:33:02Z","receivedAt":"2025-10-24T17:33:17Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On October 23, 2025 8:49 AM, Jeff King wrote:\n>On Wed, Oct 22, 2025 at 10:27:01AM -0400, rsbecker@nexbridge.com wrote:\n>\n>> I tried running with --no-pager. No difference. Interesting:\n>>\n>> git show $(git notes list HEAD)\n>>\n>> works correctly with no error report (from inside gdb), while the run of\n>>\n>> git --no-pager notes show HEAD\n>>\n>> still reports:\n>> Run till exit from #0  main (argc=5, argv=0x811d000)\n>>     at /home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/common-main.c:8\n>> Process (0,896) exited with code 037777777764.\n>>\n>> Is there a path where just an implied return is used? I have seen the optimizer\n>> return whatever is in an x86 register - rsx and rsi are both 12 at git.c:982\n>> - on occasion.\n>\n>Not that I know of (and I'd expect the compiler to complain if we ever\n>had a code path that didn't return).  It is weird that git-show produces\n>the right exit code, but our execvp() of it does not. In your place I\n>guess I'd try walking through the debugger all the way down to the exec\n>system call (and ideally convincing the debugger to keep going in the\n>exec'd process image).\n\nWhat I found is this:\n\nGit drops into sane_execvp and converts the\n\ngit notes show HEAD\n\nto\n\ngit show 1aa950256829721750e809788e7b858db79a934a.\n\nWhen execvp is called, it immediately fails with a -12 - not returned,\njust terminates. The -12 is an NonStop-specific execvp error indicating\nthe process failed because the object is invalid (strange and likely\nan artifact rather than a real problem).\n\nWhen I use the arguments as presented to execvp via bash directly, I get:\n\nerror: no note found for object 1aa950256829721750e809788e7b858db79a934a.\n\nand gdb correctly reports\n\nProcess (0,709) exited with code 01.\n\nThere is no commit with that hash. HEAD is actually 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\nso git show is correctly failing. This is Indicating that notes is not invoking git\ncorrectly.\n\n"},{"id":"529627","messageId":"20251024174659.GA3635620@coredump.intra.peff.net","threadId":"64365","inReplyTo":"029a01dc450c$4318dfe0$c94a9fa0$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-10-24T17:46:59Z","receivedAt":"2025-10-24T17:47:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 24, 2025 at 01:33:02PM -0400, rsbecker@nexbridge.com wrote:\n\n> What I found is this:\n> \n> Git drops into sane_execvp and converts the\n> \n> git notes show HEAD\n> \n> to\n> \n> git show 1aa950256829721750e809788e7b858db79a934a.\n> \n> When execvp is called, it immediately fails with a -12 - not returned,\n> just terminates. The -12 is an NonStop-specific execvp error indicating\n> the process failed because the object is invalid (strange and likely\n> an artifact rather than a real problem).\n\nWhen you say \"object\" here, you don't mean a Git object, but rather that\nexecvp() could not run the \"git\" binary for some reason (so the \"object\"\nhere is the on-disk executable)? Just making sure I understand.\n\n> When I use the arguments as presented to execvp via bash directly, I get:\n> \n> error: no note found for object 1aa950256829721750e809788e7b858db79a934a.\n>\n> There is no commit with that hash. HEAD is actually 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\n> so git show is correctly failing. This is Indicating that notes is not invoking git\n> correctly.\n\nAre you sure you are running \"git show\" there and not \"git notes show\".\nBecause 1aa950256 should be the blob that the note for HEAD points to,\nand thus does not itself have a note. And \"git show\" should not be\nlooking up notes at all (and the \"no note found\" message is from\nbuiltin/notes.c).\n\n-Peff\n"},{"id":"529629","messageId":"029f01dc4515$59ae09c0$0d0a1d40$@nexbridge.com","threadId":"64365","inReplyTo":"20251024174659.GA3635620@coredump.intra.peff.net","subject":"RE: [BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-24T18:38:05Z","receivedAt":"2025-10-24T18:38:14Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On October 24, 2025 1:47 PM, Jeff King wrote:\n>On Fri, Oct 24, 2025 at 01:33:02PM -0400, rsbecker@nexbridge.com wrote:\n>\n>> What I found is this:\n>>\n>> Git drops into sane_execvp and converts the\n>>\n>> git notes show HEAD\n>>\n>> to\n>>\n>> git show 1aa950256829721750e809788e7b858db79a934a.\n>>\n>> When execvp is called, it immediately fails with a -12 - not returned,\n>> just terminates. The -12 is an NonStop-specific execvp error\n>> indicating the process failed because the object is invalid (strange\n>> and likely an artifact rather than a real problem).\n>\n>When you say \"object\" here, you don't mean a Git object, but rather that\n>execvp() could not run the \"git\" binary for some reason (so the \"object\"\n>here is the on-disk executable)? Just making sure I understand.\n>\n>> When I use the arguments as presented to execvp via bash directly, I get:\n>>\n>> error: no note found for object\n>1aa950256829721750e809788e7b858db79a934a.\n>>\n>> There is no commit with that hash. HEAD is actually\n>> 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\n>> so git show is correctly failing. This is Indicating that notes is not\n>> invoking git correctly.\n>\n>Are you sure you are running \"git show\" there and not \"git notes show\".\n>Because 1aa950256 should be the blob that the note for HEAD points to, and thus\n>does not itself have a note. And \"git show\" should not be looking up notes at all\n>(and the \"no note found\" message is from builtin/notes.c).\n\nI am 100% sure that git notes show is running git show with the notes blob as above.\n\n"},{"id":"529630","messageId":"20251024185209.GA3637589@coredump.intra.peff.net","threadId":"64365","inReplyTo":"029f01dc4515$59ae09c0$0d0a1d40$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-10-24T18:52:09Z","receivedAt":"2025-10-24T18:52:11Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 24, 2025 at 02:38:05PM -0400, rsbecker@nexbridge.com wrote:\n\n> On October 24, 2025 1:47 PM, Jeff King wrote:\n> >On Fri, Oct 24, 2025 at 01:33:02PM -0400, rsbecker@nexbridge.com wrote:\n> >\n> >> What I found is this:\n> >>\n> >> Git drops into sane_execvp and converts the\n> >>\n> >> git notes show HEAD\n> >>\n> >> to\n> >>\n> >> git show 1aa950256829721750e809788e7b858db79a934a.\n> >>\n> >> When execvp is called, it immediately fails with a -12 - not returned,\n> >> just terminates. The -12 is an NonStop-specific execvp error\n> >> indicating the process failed because the object is invalid (strange\n> >> and likely an artifact rather than a real problem).\n> >\n> >When you say \"object\" here, you don't mean a Git object, but rather that\n> >execvp() could not run the \"git\" binary for some reason (so the \"object\"\n> >here is the on-disk executable)? Just making sure I understand.\n> >\n> >> When I use the arguments as presented to execvp via bash directly, I get:\n> >>\n> >> error: no note found for object\n> >1aa950256829721750e809788e7b858db79a934a.\n> >>\n> >> There is no commit with that hash. HEAD is actually\n> >> 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\n> >> so git show is correctly failing. This is Indicating that notes is not\n> >> invoking git correctly.\n> >\n> >Are you sure you are running \"git show\" there and not \"git notes show\".\n> >Because 1aa950256 should be the blob that the note for HEAD points to, and thus\n> >does not itself have a note. And \"git show\" should not be looking up notes at all\n> >(and the \"no note found\" message is from builtin/notes.c).\n> \n> I am 100% sure that git notes show is running git show with the notes blob as above.\n\nYes, I am, too. What I was asking is when you tried to replicate that\nusing bash directly, how did you get a \"no note found\" message from \"git\nshow\"? I.e., it sounds like you ran the wrong command. Or I am\nmisunderstanding what you you meant by \"When I use the arguments as\npresented to execvp via bash directly\".\n\n-Peff\n"},{"id":"529632","messageId":"02a401dc4518$bbf66110$33e32330$@nexbridge.com","threadId":"64365","inReplyTo":"20251024185209.GA3637589@coredump.intra.peff.net","subject":"RE: [BUG] Strange git notes completion behaviour","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-10-24T19:02:18Z","receivedAt":"2025-10-24T19:02:28Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"\n\n>-----Original Message-----\n>From: Jeff King <peff@peff.net>\n>Sent: October 24, 2025 2:52 PM\n>To: rsbecker@nexbridge.com\n>Cc: 'D. Ben Knoble' <ben.knoble@gmail.com>; git@vger.kernel.org\n>Subject: Re: [BUG] Strange git notes completion behaviour\n>\n>On Fri, Oct 24, 2025 at 02:38:05PM -0400, rsbecker@nexbridge.com wrote:\n>\n>> On October 24, 2025 1:47 PM, Jeff King wrote:\n>> >On Fri, Oct 24, 2025 at 01:33:02PM -0400, rsbecker@nexbridge.com wrote:\n>> >\n>> >> What I found is this:\n>> >>\n>> >> Git drops into sane_execvp and converts the\n>> >>\n>> >> git notes show HEAD\n>> >>\n>> >> to\n>> >>\n>> >> git show 1aa950256829721750e809788e7b858db79a934a.\n>> >>\n>> >> When execvp is called, it immediately fails with a -12 - not\n>> >> returned, just terminates. The -12 is an NonStop-specific execvp\n>> >> error indicating the process failed because the object is invalid\n>> >> (strange and likely an artifact rather than a real problem).\n>> >\n>> >When you say \"object\" here, you don't mean a Git object, but rather\n>> >that\n>> >execvp() could not run the \"git\" binary for some reason (so the \"object\"\n>> >here is the on-disk executable)? Just making sure I understand.\n>> >\n>> >> When I use the arguments as presented to execvp via bash directly, I get:\n>> >>\n>> >> error: no note found for object\n>> >1aa950256829721750e809788e7b858db79a934a.\n>> >>\n>> >> There is no commit with that hash. HEAD is actually\n>> >> 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\n>> >> so git show is correctly failing. This is Indicating that notes is\n>> >> not invoking git correctly.\n>> >\n>> >Are you sure you are running \"git show\" there and not \"git notes show\".\n>> >Because 1aa950256 should be the blob that the note for HEAD points\n>> >to, and thus does not itself have a note. And \"git show\" should not\n>> >be looking up notes at all (and the \"no note found\" message is from\n>builtin/notes.c).\n>>\n>> I am 100% sure that git notes show is running git show with the notes blob as\n>above.\n>\n>Yes, I am, too. What I was asking is when you tried to replicate that using bash\n>directly, how did you get a \"no note found\" message from \"git show\"? I.e., it\n>sounds like you ran the wrong command. Or I am misunderstanding what you you\n>meant by \"When I use the arguments as presented to execvp via bash directly\".\n\nI ran the exact command that git passed to execvp but did so via bash. This is what\ngdb showed:\n\nBreakpoint 2, sane_execvp (file=0x80aa470 \"git\", argv=0x8122700)\n    at /home/randall/git/run-command.c:244\n*  244          int exec_id = trace2_exec(file, (const char **)argv);\n(xInspect 0,1011):n\n*  247          if (!execvp(file, argv))\n(xInspect 0,1011):p file\n$1 = (const unsigned char *) 0x80aa470 \"git\"\n(xInspect 0,1011):p argv[0]\n$2 = 0x81224a0 \"git\"\n(xInspect 0,1011):p argv[1]\n$3 = 0x8122770 \"show\"\n(xInspect 0,1011):p argv[2]\n$4 = 0x8122780 \"1aa950256829721750e809788e7b858db79a934a\"\n(xInspect 0,1011):p argv[3]\n$5 = 0x0\n\nI assumed that I should give that command a try from bash.\n\n"},{"id":"529635","messageId":"20251024201638.GA3640095@coredump.intra.peff.net","threadId":"64365","inReplyTo":"02a401dc4518$bbf66110$33e32330$@nexbridge.com","subject":"Re: [BUG] Strange git notes completion behaviour","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-10-24T20:16:38Z","receivedAt":"2025-10-24T20:16:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 24, 2025 at 03:02:18PM -0400, rsbecker@nexbridge.com wrote:\n\n> >> >> When I use the arguments as presented to execvp via bash directly, I get:\n> >> >>\n> >> >> error: no note found for object\n> >> >1aa950256829721750e809788e7b858db79a934a.\n> >> >>\n> >> >> There is no commit with that hash. HEAD is actually\n> >> >> 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3\n> >> >> so git show is correctly failing. This is Indicating that notes is\n> >> >> not invoking git correctly.\n> >> >\n> >> >Are you sure you are running \"git show\" there and not \"git notes show\".\n> >> >Because 1aa950256 should be the blob that the note for HEAD points\n> >> >to, and thus does not itself have a note. And \"git show\" should not\n> >> >be looking up notes at all (and the \"no note found\" message is from\n> >builtin/notes.c).\n> >>\n> >> I am 100% sure that git notes show is running git show with the notes blob as\n> >above.\n> >\n> >Yes, I am, too. What I was asking is when you tried to replicate that using bash\n> >directly, how did you get a \"no note found\" message from \"git show\"? I.e., it\n> >sounds like you ran the wrong command. Or I am misunderstanding what you you\n> >meant by \"When I use the arguments as presented to execvp via bash directly\".\n> \n> I ran the exact command that git passed to execvp but did so via bash. This is what\n> gdb showed:\n> \n> Breakpoint 2, sane_execvp (file=0x80aa470 \"git\", argv=0x8122700)\n>     at /home/randall/git/run-command.c:244\n> *  244          int exec_id = trace2_exec(file, (const char **)argv);\n> (xInspect 0,1011):n\n> *  247          if (!execvp(file, argv))\n> (xInspect 0,1011):p file\n> $1 = (const unsigned char *) 0x80aa470 \"git\"\n> (xInspect 0,1011):p argv[0]\n> $2 = 0x81224a0 \"git\"\n> (xInspect 0,1011):p argv[1]\n> $3 = 0x8122770 \"show\"\n> (xInspect 0,1011):p argv[2]\n> $4 = 0x8122780 \"1aa950256829721750e809788e7b858db79a934a\"\n> (xInspect 0,1011):p argv[3]\n> $5 = 0x0\n> \n> I assumed that I should give that command a try from bash.\n\nOK, yeah, that's what I thought you meant. And that command produced the\noutput \"error: no note found for object 1aa95025...\"? That doesn't make\nany sense to me. Which is why I asked if you accidentally typo'd it into\n\"git notes show 1aa95025...\".\n\n-Peff\n"}]}