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

Re: [BUG] Strange git notes completion behaviour

From
Jeff King <peff@peff.net>
Date
Oct 24, 2025, 20:16 UTC
Message-ID
<20251024201638.GA3640095@coredump.intra.peff.net>
In-Reply-To
<02a401dc4518$bbf66110$33e32330$@nexbridge.com>
On Fri, Oct 24, 2025 at 03:02:18PM -0400, rsbecker@nexbridge.com wrote:
Show 44 quoted lines
> >> >> When I use the arguments as presented to execvp via bash directly, I get:
> >> >>
> >> >> error: no note found for object
> >> >1aa950256829721750e809788e7b858db79a934a.
> >> >>
> >> >> There is no commit with that hash. HEAD is actually
> >> >> 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3
> >> >> so git show is correctly failing. This is Indicating that notes is
> >> >> not invoking git correctly.
> >> >
> >> >Are you sure you are running "git show" there and not "git notes show".
> >> >Because 1aa950256 should be the blob that the note for HEAD points
> >> >to, and thus does not itself have a note. And "git show" should not
> >> >be looking up notes at all (and the "no note found" message is from
> >builtin/notes.c).
> >>
> >> I am 100% sure that git notes show is running git show with the notes blob as
> >above.
> >
> >Yes, I am, too. What I was asking is when you tried to replicate that using bash
> >directly, how did you get a "no note found" message from "git show"? I.e., it
> >sounds like you ran the wrong command. Or I am misunderstanding what you you
> >meant by "When I use the arguments as presented to execvp via bash directly".
> 
> I ran the exact command that git passed to execvp but did so via bash. This is what
> gdb showed:
> 
> Breakpoint 2, sane_execvp (file=0x80aa470 "git", argv=0x8122700)
>     at /home/randall/git/run-command.c:244
> *  244          int exec_id = trace2_exec(file, (const char **)argv);
> (xInspect 0,1011):n
> *  247          if (!execvp(file, argv))
> (xInspect 0,1011):p file
> $1 = (const unsigned char *) 0x80aa470 "git"
> (xInspect 0,1011):p argv[0]
> $2 = 0x81224a0 "git"
> (xInspect 0,1011):p argv[1]
> $3 = 0x8122770 "show"
> (xInspect 0,1011):p argv[2]
> $4 = 0x8122780 "1aa950256829721750e809788e7b858db79a934a"
> (xInspect 0,1011):p argv[3]
> $5 = 0x0
> 
> I assumed that I should give that command a try from bash.

OK, yeah, that's what I thought you meant. And that command produced the output "error: no note found for object 1aa95025..."? That doesn't make any sense to me. Which is why I asked if you accidentally typo'd it into "git notes show 1aa95025...".

-Peff
Previous: rsbecker@nexbridge.com
Message 12 of 12 in “[BUG] Strange git notes completion behaviour”
  1. rsbecker@nexbridge.comOct 21, 2025
  2. D. Ben KnobleOct 21, 2025
  3. rsbecker@nexbridge.comOct 21, 2025
  4. Jeff KingOct 22, 2025
  5. rsbecker@nexbridge.comOct 22, 2025
  6. Jeff KingOct 23, 2025
  7. rsbecker@nexbridge.comOct 24, 2025
  8. Jeff KingOct 24, 2025
  9. rsbecker@nexbridge.comOct 24, 2025
  10. Jeff KingOct 24, 2025
  11. rsbecker@nexbridge.comOct 24, 2025
  12. Jeff KingOct 24, 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.