Merge branch 'mg/fix-log-mergetag-color' into maint
* mg/fix-log-mergetag-color: log: correctly identify mergetag signature verification status
This commit is contained in:
commit
514dd21326
21
log-tree.c
21
log-tree.c
@ -446,16 +446,17 @@ static void show_one_mergetag(struct rev_info *opt,
|
|||||||
|
|
||||||
payload_size = parse_signature(extra->value, extra->len);
|
payload_size = parse_signature(extra->value, extra->len);
|
||||||
status = -1;
|
status = -1;
|
||||||
if (extra->len > payload_size)
|
if (extra->len > payload_size) {
|
||||||
if (verify_signed_buffer(extra->value, payload_size,
|
/* could have a good signature */
|
||||||
extra->value + payload_size,
|
if (!verify_signed_buffer(extra->value, payload_size,
|
||||||
extra->len - payload_size,
|
extra->value + payload_size,
|
||||||
&verify_message, NULL)) {
|
extra->len - payload_size,
|
||||||
if (verify_message.len <= gpg_message_offset)
|
&verify_message, NULL))
|
||||||
strbuf_addstr(&verify_message, "No signature\n");
|
status = 0; /* good */
|
||||||
else
|
else if (verify_message.len <= gpg_message_offset)
|
||||||
status = 0;
|
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);
|
show_sig_lines(opt, status, verify_message.buf);
|
||||||
strbuf_release(&verify_message);
|
strbuf_release(&verify_message);
|
||||||
|
Loading…
Reference in New Issue
Block a user