From: Junio C Hamano Date: Tue, 18 Apr 2023 16:24:20 GMT Subject: Re: gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1) Message-ID: In-Reply-To: <20230418064846.GA1414@coredump.intra.peff.net> Jeff King 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.