Start of diff misdetected when message line starts with 'diff'

Stefan Hajnoczi stefanha at
Sat Jan 14 01:01:01 EST 2012

The patch parser misdetects diffs because it does the following in

for line in text.split('\n'):
    line += '\n'

    if state == 0:
        if line.startswith('diff') or line.startswith('===') \
                or line.startswith('Index: '):

For a real-life example see
where a line begins with the word "difficult".

I wanted to add a unit test and fix could not get the test suite to
run.  Is there documentation on how to run


More information about the Patchwork mailing list