summaryrefslogtreecommitdiff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-23 00:50:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-23 17:08:51 (GMT)
commite5fba5d55886eaf48aeeb158dd4d30c2fc0294c9 (patch)
tree31eff0b791e7d3dbc8b270a69789ab363ba89577 /ref-filter.c
parent1688c9a4894df517241026c7a3848bdc84607986 (diff)
downloadgit-e5fba5d55886eaf48aeeb158dd4d30c2fc0294c9.zip
git-e5fba5d55886eaf48aeeb158dd4d30c2fc0294c9.tar.gz
git-e5fba5d55886eaf48aeeb158dd4d30c2fc0294c9.tar.bz2
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>
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 01c1a82..92557d4 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -223,6 +223,8 @@ static int trailers_atom_parser(const struct ref_format *format, struct used_ato
struct string_list params = STRING_LIST_INIT_DUP;
int i;
+ atom->u.contents.trailer_opts.no_divider = 1;
+
if (arg) {
string_list_split(&params, arg, ',', -1);
for (i = 0; i < params.nr; i++) {