Thread (3 messages) flat view 3 messages, 3 authors, 2018-08-09

Re: [PATCH 1/1] verify-tag/verify-commit should exit unsuccessfully when signature is not trusted

From: Jeff King <hidden>
Date: 2018-08-09 14:30:14

On Thu, Aug 09, 2018 at 01:43:02AM +0000, brian m. carlson wrote:
On Wed, Aug 08, 2018 at 05:59:43PM -0700, Junio C Hamano wrote:
quoted
"brian m. carlson" [off-list ref] writes:
quoted
quoted
FWIW, I'm on board with returning non-zero in any case where gpg would.
I think that's probably the best solution overall.
FWIW, I am not married to the current behaviour.  I would not be
surprised if it mostly came by accident and not designed.
Since apparently I was the author of the commit that changed the
behavior originally, let me simply say that I was not aware that gpg
signalled the correctness of a signature by its exit status when I wrote
that patch.  If I had known that, I would have deferred to gpg in my
change.  My goal was consistency between verify-tag and verify-commit,
and in retrospect I probably made the wrong decision.
OK, so it seems like we're all in agreement now.

What next?

There was a patch at the start of this thread, but it specifically
checks for "sigc->result == U".  That's probably OK, since I think it
restores the behavior in earlier versions of Git. But I wonder if we
should simply be storing the fact that gpg exited non-zero and relaying
that. That would fix this problem and truly make the rule "if gpg
reported an error, we propagate that".

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help