summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2013-02-14 17:04:43 +0100
committerJunio C Hamano <gitster@pobox.com>2013-02-14 09:29:30 -0800
commit1315093f99f327ff498ae6c8afcc42651bbddebc (patch)
tree03065923fcf61f4a1f3c5b8d324572f7f0471940 /log-tree.c
parentb60b7566c04e5f54c0e40229c1716d99d834ab68 (diff)
downloadgit-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.c25
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);