summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-08-22 20:50:37 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-23 10:08:51 -0700
commitffce7f590fabee6f2314ffd891f1fd3629222839 (patch)
tree861728a925660f13245dab61bcd8a4ac33259f62 /Documentation
parentpretty, ref-filter: format %(trailers) with no_divider option (diff)
downloadtgif-ffce7f590fabee6f2314ffd891f1fd3629222839.tar.xz
sequencer: ignore "---" divider when parsing trailers
When the sequencer code appends a signoff or cherry-pick origin, it uses the default trailer-parsing options, which treat "---" as the end of the commit message. As a result, it may be fooled by a commit message that contains that string and fail to find the existing trailer block. Even more confusing, the actual append code does not know about "---", and always appends to the end of the string. This can lead to bizarre results. E.g., appending a signoff to a commit message like this: subject body --- these dashes confuse the parser! Signed-off-by: A results in output with a final block like: Signed-off-by: A Signed-off-by: A The parser thinks the final line of the message is "body", and ignores everything else, claiming there are no trailers. So we output an extra newline separator (wrong) and add a duplicate signoff (also wrong). Since we know we are feeding a pure commit message, we can simply tell the parser to ignore the "---" divider. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions