pretty, ref-filter: format %(trailers) with no_divider option

In both of these cases we know that we are feeding the
trailer-parsing code a pure commit message. We should tell
it so, which avoids false positives for a commit message
that contains a "---" line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2018-08-22 20:50:17 -04:00
committed by Junio C Hamano
parent 1688c9a489
commit e5fba5d558
4 changed files with 51 additions and 0 deletions

View File

@ -1304,6 +1304,9 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
if (skip_prefix(placeholder, "(trailers", &arg)) {
struct process_trailer_options opts = PROCESS_TRAILER_OPTIONS_INIT;
opts.no_divider = 1;
if (*arg == ':') {
arg++;
for (;;) {