summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2014-06-27 15:18:36 +0200
committerJunio C Hamano <gitster@pobox.com>2014-07-10 15:25:03 -0700
commit42c55ce49eb3c8741f62a0abdfb38182d461126c (patch)
tree38a1d061ae22a3c1352313e88ba120b33118e00c /log-tree.c
parent7bbc4e8fdb33e0a8e42e77cc05460d4c4f615f4d (diff)
downloadgit-42c55ce49eb3c8741f62a0abdfb38182d461126c.tar.gz
log: correctly identify mergetag signature verification statusmg/fix-log-mergetag-color
A wrong '}' made our code record the results of mergetag signature verification incorrectly. Fix it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/log-tree.c b/log-tree.c
index 1982631ca4..b4bbfe1271 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);