Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-23 03:50:17 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-23 20:08:51 +0300
commite5fba5d55886eaf48aeeb158dd4d30c2fc0294c9 (patch)
tree31eff0b791e7d3dbc8b270a69789ab363ba89577 /pretty.c
parent1688c9a4894df517241026c7a3848bdc84607986 (diff)
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 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pretty.c b/pretty.c
index 703fa6ff7b..c0af210e9d 100644
--- a/pretty.c
+++ b/pretty.c
@@ -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 (;;) {