]> git.ozlabs.org Git - patchwork/commit
parser: allow words starting with "diff" at beginning of line
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Sat, 14 Jan 2012 01:17:40 +0000 (01:17 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Sat, 14 Jan 2012 19:29:26 +0000 (19:29 +0000)
commitb76f7dd32ef83d55ace2f38ed84f5fc76e65e18e
treed03324944c9d8d0b5601e66025796242ee10ea23
parent0f3b76430ad276e8956ac388452e007d501cc54d
parser: allow words starting with "diff" at beginning of line

The patch parser splits emails incorrectly when the comment contains a
line whose first word starts with "diff" (like "difficult" or
"different").

For a real-life example of an email that triggers this bug, see
http://patchwork.ozlabs.org/patch/135291/.

Fix the issue by checking for a space after "diff".  Add
DiffWordInCommentTest to the test suite.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/parser.py
apps/patchwork/tests/patchparser.py