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

Re: gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1)

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 18, 2023, 16:24 UTC
Message-ID
<xmqqy1mpduq3.fsf@gitster.g>
In-Reply-To
<20230418064846.GA1414@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> which restores the original behavior, or if the original was papering
> over another bug (e.g., should this be "undefined"?). Certainly the
> empty string matches other placeholders like %GS for this case (since we
> obviously don't know anything about the signer).

Heh, I shouldn't have wasted my cycles in "git log" but in my newsreader ;-)

Looking at the original before the gpg_trust_level_to_str() function was introduced, the switch statement looks like it is missing the usual "default: BUG()" for unhandled enum. My version made it mimic what ssh side seems to do, but I tend to prefer your empty string that differentiates between "we never saw any trust level" and "the system says this key should never be trusted".

Thanks.
Previous: Jaydeep DasNext: Jeff King
Message 4 of 9 in “gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1)”
  1. Rolf Eike BeerApr 18, 2023
  2. Jeff KingApr 18, 2023
  3. Jaydeep DasApr 18, 2023
  4. Junio C HamanoApr 18, 2023
  5. gpg-interface: set trust level of missing key to "undefined"Jeff King, Apr 19, 2023
  6. Junio C HamanoApr 19, 2023
  7. Jeff KingApr 22, 2023
  8. Junio C HamanoApr 24, 2023
  9. Junio C HamanoApr 18, 2023

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.