diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2016-10-21 10:55:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-21 11:48:35 -0700 |
commit | c463a6b28023dd3ad7ad4542147e20c27dbc83d6 (patch) | |
tree | 86aef84aedfa56c587b2480081f3b442ce3b2e3d /trailer.c | |
parent | 146245063e286d5a38b146bd5a38da958bd3957b (diff) | |
download | git-c463a6b28023dd3ad7ad4542147e20c27dbc83d6.tar.gz |
trailer: forbid leading whitespace in trailers
Currently, interpret-trailers allows leading whitespace in trailer
lines. This leads to false positives, especially for quoted lines or
bullet lists.
Forbid leading whitespace in trailers.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.c')
-rw-r--r-- | trailer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -775,7 +775,7 @@ static int find_trailer_start(struct strbuf **lines, int count) } separator_pos = find_separator(lines[start]->buf); - if (separator_pos >= 1) { + if (separator_pos >= 1 && !isspace(lines[start]->buf[0])) { struct list_head *pos; trailer_lines++; |