diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-20 21:33:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-20 21:33:50 +0300 |
commit | 4d34122eef19c39415d38b4963572770f96a9317 (patch) | |
tree | 8cb68ce59bf365035d3427cb398726f6d4943a6b | |
parent | 6e8f3d1ca06f42714bc82070513a5d8d0ef15da4 (diff) | |
parent | 4e5dc9ca179931b4dc39b32f06facc5a31091403 (diff) |
Merge branch 'jc/gpg-status'
"git verify-tag" and "git verify-commit" have been taught to use
the exit status of underlying "gpg --verify" to signal bad or
untrusted signature they found.
* jc/gpg-status:
gpg-interface: propagate exit status from gpg back to the callers
-rw-r--r-- | gpg-interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index bb8ea668b3..db17d65f8a 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -136,12 +136,13 @@ int check_signature(const char *payload, size_t plen, const char *signature, sigc->gpg_output = strbuf_detach(&gpg_output, NULL); sigc->gpg_status = strbuf_detach(&gpg_status, NULL); parse_gpg_output(sigc); + status |= sigc->result != 'G' && sigc->result != 'U'; out: strbuf_release(&gpg_status); strbuf_release(&gpg_output); - return sigc->result != 'G' && sigc->result != 'U'; + return !!status; } void print_signature_buffer(const struct signature_check *sigc, unsigned flags) |