Bad splitting of complex patch into commit message & diff
Found by: @adrinael
Offending patch: breaks-patchwork-parsing.txt
Result: https://patchwork.freedesktop.org/patch/347352/
The patch was not parsed/split correctly and large chunk of the diff ends up in the commit message instead of the patch body making the whole thing not appliable.
Patchwork splits email into commit message and the patch body. This is done so tags from the comments (e.g. reviewed-by) can be appended to the resulting mbox.
The issue seems to be in patch_parse()
which is handling the splitting.