diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-22 10:28:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-22 10:28:43 -0700 |
commit | 514dd21326db3d0f429b9fa9cd5fdbd0d2c417d1 (patch) | |
tree | 7a08243024fa1c473c549ba25b490e20c7e4516e | |
parent | 5796c5baa3ef0a7d179fdac6cb5815f75f65fd53 (diff) | |
parent | 42c55ce49eb3c8741f62a0abdfb38182d461126c (diff) | |
download | git-514dd21326db3d0f429b9fa9cd5fdbd0d2c417d1.tar.gz git-514dd21326db3d0f429b9fa9cd5fdbd0d2c417d1.tar.xz |
Merge branch 'mg/fix-log-mergetag-color' into maint
* mg/fix-log-mergetag-color:
log: correctly identify mergetag signature verification status
-rw-r--r-- | log-tree.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/log-tree.c b/log-tree.c index 10e68442b..c13184aaf 100644 --- a/log-tree.c +++ b/log-tree.c @@ -446,16 +446,17 @@ static void show_one_mergetag(struct rev_info *opt, payload_size = parse_signature(extra->value, extra->len); 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, NULL)) { - if (verify_message.len <= gpg_message_offset) - strbuf_addstr(&verify_message, "No signature\n"); - else - status = 0; - } + if (extra->len > payload_size) { + /* could have a good signature */ + if (!verify_signed_buffer(extra->value, payload_size, + extra->value + payload_size, + extra->len - payload_size, + &verify_message, NULL)) + status = 0; /* good */ + else if (verify_message.len <= gpg_message_offset) + strbuf_addstr(&verify_message, "No signature\n"); + /* otherwise we couldn't verify, which is shown as bad */ + } show_sig_lines(opt, status, verify_message.buf); strbuf_release(&verify_message); |