path: root/builtin
diff options
authorJonathan Tan <>2017-04-26 20:50:03 (GMT)
committerJunio C Hamano <>2017-04-27 00:48:50 (GMT)
commit44dc738a39f2c4dba41c0ddacae280d0f88dc71f (patch)
treef68e4d005851dbeaee837137855fdeacc57dd6a8 /builtin
parent967dfd4d568c2b102281de8cc22ee35f7558358b (diff)
sequencer: add newline before adding footers
When encountering a commit message that does not end in a newline, sequencer does not complete the line before determining if a blank line should be added. This causes the "(cherry picked..." and sign-off lines to sometimes appear on the same line as the last line of the commit message. This behavior was introduced by commit 967dfd4 ("sequencer: use trailer's trailer layout", 2016-11-29). However, a revert of that commit would not resolve this issue completely: prior to that commit, a conforming footer was deemed to be non-conforming by has_conforming_footer() if there was no terminating newline, resulting in both conforming and non-conforming footers being treated the same when they should not be. Resolve this issue, both for conforming and non-conforming footers, and in both do_pick_commit() and append_signoff(), by always adding a newline to the commit message if it does not end in one before checking the footer for conformity. Reported-by: Brian Norris <> Signed-off-by: Jonathan Tan <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions