diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2013-02-14 17:04:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-14 09:29:30 -0800 |
commit | 1315093f99f327ff498ae6c8afcc42651bbddebc (patch) | |
tree | 03065923fcf61f4a1f3c5b8d324572f7f0471940 /log-tree.c | |
parent | b60b7566c04e5f54c0e40229c1716d99d834ab68 (diff) | |
download | git-1315093f99f327ff498ae6c8afcc42651bbddebc.tar.gz |
log-tree: rely upon the check in the gpg_interface
It's just so much clearer.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/log-tree.c b/log-tree.c index 4f86defe32..ff9522f3d4 100644 --- a/log-tree.c +++ b/log-tree.c @@ -498,20 +498,17 @@ static void show_one_mergetag(struct rev_info *opt, gpg_message_offset = verify_message.len; payload_size = parse_signature(extra->value, extra->len); - if ((extra->len <= payload_size) || - (verify_signed_buffer(extra->value, payload_size, - extra->value + payload_size, - extra->len - payload_size, - &verify_message) && - verify_message.len <= gpg_message_offset)) { - strbuf_addstr(&verify_message, "No signature\n"); - status = -1; - } - else if (strstr(verify_message.buf + gpg_message_offset, - ": Good signature from ")) - status = 0; - else - status = -1; + status = -1; + if (extra->len > payload_size) + if (verify_signed_buffer(extra->value, payload_size, + extra->value + payload_size, + extra->len - payload_size, + &verify_message)) { + if (verify_message.len <= gpg_message_offset) + strbuf_addstr(&verify_message, "No signature\n"); + else + status = 0; + } show_sig_lines(opt, status, verify_message.buf); strbuf_release(&verify_message); |