Subject: RE: [BUG] Strange git notes completion behaviour

From: <[email-masked]>
Date: Tue, 21 Oct 2025 17:52:38 -0400

On October 21, 2025 5:33 PM, D. Ben Knoble wrote:
>On Tue, Oct 21, 2025 at 5:07 PM <[email-masked]> wrote:
>>
>> Hi All,
>>
>> I tried the following in git 2.51.0 on NonStop (big endian x86):
>>
>> git notes add -m "Test Note" HEAD
>> git notes show HEAD
>>
>> The git notes show reports a completion code of 037777777764 (-12).
>> This gets hidden by bash, which truncates negative results so it shows
>> as 0, not -12.
>> This
>> only seems to happen in git notes show, not any other commands or
>> sub-commands. I checked in gdb and this is in fact happening. Anywhere
>> I can look to try to find where this is failing?
>>
>> --Randall
>
>Exit code or shell (tab) completion? I'm a bit confused, so maybe someone else is,
>too.

It is the exit code. When in gdb, the return from notes is -12 as above. By the time
It gets back to bash, the lower bytes are dropped so I end up with a 0xFF, which
bash thinks is a 0, so the exit code is hidden from view. I tried the !!fn construct
in a standard alone test program with no wisdom gained.