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

From: Junio C Hamano <[email-masked]>
Date: Tue, 18 Apr 2023 09:24:20 -0700

Jeff King <[email-masked]> 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.