git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Rolf Eike Beer <eb@emlix.com>,
	git@vger.kernel.org, Jaydeep P Das <jaydeepjd.8914@gmail.com>,
	Hariom Verma <hariom18599@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1)
Date: Tue, 18 Apr 2023 09:24:20 -0700	[thread overview]
Message-ID: <xmqqy1mpduq3.fsf@gitster.g> (raw)
In-Reply-To: <20230418064846.GA1414@coredump.intra.peff.net> (Jeff King's message of "Tue, 18 Apr 2023 02:48:46 -0400")

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.

  parent reply	other threads:[~2023-04-18 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  6:12 gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1) Rolf Eike Beer
2023-04-18  6:48 ` Jeff King
2023-04-18 15:16   ` Jaydeep Das
2023-04-18 16:24   ` Junio C Hamano [this message]
2023-04-19  1:29     ` [PATCH] gpg-interface: set trust level of missing key to "undefined" Jeff King
2023-04-19 15:30       ` Junio C Hamano
2023-04-22 10:47         ` Jeff King
2023-04-24 16:22           ` Junio C Hamano
2023-04-18 16:17 ` gpg-related crash with custom formatter (BUG: gpg-interface.c:915: invalid trust level requested -1) Junio C Hamano

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=xmqqy1mpduq3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=eb@emlix.com \
    --cc=git@vger.kernel.org \
    --cc=hariom18599@gmail.com \
    --cc=jaydeepjd.8914@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).