]> git.ozlabs.org Git - patchwork/commit
parser: Fix parsing of patches with a trailing no-newline marker
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 18 Mar 2015 03:39:24 +0000 (14:39 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Sun, 22 Mar 2015 13:27:09 +0000 (21:27 +0800)
commit86f645abb13ff65ef04b085b443168d5b5622e4d
tree912de7d2ea948d9057a6023c53884dafcd774938
parent93aa30e45f7502f3209bf5ebf4e7966ff5a26899
parser: Fix parsing of patches with a trailing no-newline marker

If a patch ends with a "No newline at end of file" marker, it is
incorrectly considered part of the comment.

Add a testcase which shows the bug, and then fix the parser. The parser
fix is hopefully sufficiently specific so as to not break any other
unrelated case. But ..

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
apps/patchwork/parser.py
apps/patchwork/tests/mail/0011-no-newline-at-end-of-file.mbox [new file with mode: 0644]
apps/patchwork/tests/test_patchparser.py