X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=blobdiff_plain;f=apps%2Fpatchwork%2Fparser.py;h=a51a7b609af0c1df36a85f0d9fac4670efd9322e;hp=76f409cd5b4aa66b9e22856717fed2bdba83ff68;hb=f09e982f58384946111d4157fd2b7c2b31b78612;hpb=b08229de74367b95f851f7bb2c89781022df4101 diff --git a/apps/patchwork/parser.py b/apps/patchwork/parser.py index 76f409c..a51a7b6 100644 --- a/apps/patchwork/parser.py +++ b/apps/patchwork/parser.py @@ -126,6 +126,11 @@ def parse_patch(text): buf = '' state = 2 + elif hunk and line.startswith('\ No newline at end of file'): + # If we had a hunk and now we see this, it's part of the patch, + # and we're still expecting another @@ line. + patchbuf += line + elif hunk: state = 1 buf += line