From: <rsbecker@nexbridge.com>
To: "'Jeff King'" <peff@peff.net>
Cc: "'D. Ben Knoble'" <ben.knoble@gmail.com>, <git@vger.kernel.org>
Subject: RE: [BUG] Strange git notes completion behaviour
Date: Fri, 24 Oct 2025 15:02:18 -0400 [thread overview]
Message-ID: <02a401dc4518$bbf66110$33e32330$@nexbridge.com> (raw)
In-Reply-To: <20251024185209.GA3637589@coredump.intra.peff.net>
>-----Original Message-----
>From: Jeff King <peff@peff.net>
>Sent: October 24, 2025 2:52 PM
>To: rsbecker@nexbridge.com
>Cc: 'D. Ben Knoble' <ben.knoble@gmail.com>; git@vger.kernel.org
>Subject: Re: [BUG] Strange git notes completion behaviour
>
>On Fri, Oct 24, 2025 at 02:38:05PM -0400, rsbecker@nexbridge.com wrote:
>
>> On October 24, 2025 1:47 PM, Jeff King wrote:
>> >On Fri, Oct 24, 2025 at 01:33:02PM -0400, rsbecker@nexbridge.com wrote:
>> >
>> >> What I found is this:
>> >>
>> >> Git drops into sane_execvp and converts the
>> >>
>> >> git notes show HEAD
>> >>
>> >> to
>> >>
>> >> git show 1aa950256829721750e809788e7b858db79a934a.
>> >>
>> >> When execvp is called, it immediately fails with a -12 - not
>> >> returned, just terminates. The -12 is an NonStop-specific execvp
>> >> error indicating the process failed because the object is invalid
>> >> (strange and likely an artifact rather than a real problem).
>> >
>> >When you say "object" here, you don't mean a Git object, but rather
>> >that
>> >execvp() could not run the "git" binary for some reason (so the "object"
>> >here is the on-disk executable)? Just making sure I understand.
>> >
>> >> 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.
next prev parent reply other threads:[~2025-10-24 19:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 21:06 [BUG] Strange git notes completion behaviour rsbecker
2025-10-21 21:32 ` D. Ben Knoble
2025-10-21 21:52 ` rsbecker
2025-10-22 9:27 ` Jeff King
2025-10-22 14:27 ` rsbecker
2025-10-23 12:48 ` Jeff King
2025-10-24 17:33 ` rsbecker
2025-10-24 17:46 ` Jeff King
2025-10-24 18:38 ` rsbecker
2025-10-24 18:52 ` Jeff King
2025-10-24 19:02 ` rsbecker [this message]
2025-10-24 20:16 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='02a401dc4518$bbf66110$33e32330$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.