diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-02-24 11:32:29 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-02-24 11:32:29 -0800 |
| commit | 38a227b796653d61a21d9b31e44e48dd66f647e0 (patch) | |
| tree | 0be7f37dee5a80200ba2b7fd4f471764132879ab /gpg-interface.c | |
| parent | Merge branch 'rs/ctype-test' (diff) | |
| parent | gpg: do show gpg's error message upon failure (diff) | |
| download | git-38a227b796653d61a21d9b31e44e48dd66f647e0.tar.gz git-38a227b796653d61a21d9b31e44e48dd66f647e0.zip | |
Merge branch 'js/gpg-errors'
Error messages given upon a signature verification failure used to
discard the errors from underlying gpg program, which has been
corrected.
* js/gpg-errors:
gpg: do show gpg's error message upon failure
t7510: add a test case that does not need gpg
Diffstat (limited to 'gpg-interface.c')
| -rw-r--r-- | gpg-interface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index 687236430b..5cd66d3a78 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -977,9 +977,13 @@ static int sign_buffer_gpg(struct strbuf *buffer, struct strbuf *signature, break; /* found */ } ret |= !cp; + if (ret) { + error(_("gpg failed to sign the data:\n%s"), + gpg_status.len ? gpg_status.buf : "(no gpg output)"); + strbuf_release(&gpg_status); + return -1; + } strbuf_release(&gpg_status); - if (ret) - return error(_("gpg failed to sign the data")); /* Strip CR from the line endings, in case we are on Windows. */ remove_cr_after(signature, bottom); |
