]> granicus.if.org Git - libvpx/commitdiff
Ignore missing newline message
authorJohann <johannkoenig@google.com>
Mon, 3 Feb 2014 20:15:17 +0000 (12:15 -0800)
committerJohann <johannkoenig@google.com>
Tue, 4 Feb 2014 23:24:02 +0000 (15:24 -0800)
git diff adds the following line to diffs:
\ No newline at end of file

which interferes with diff.py parsing. diff.py only looks for '+', '-'
and ' ' at the beginning of the line.

Issue seen on https://gerrit.chromium.org/gerrit/68611

Change-Id: I0d7b4485c470e0b409f2c9cddde6c9aceba0152e

tools/diff.py

index a42a4dc7cafe1905145fbfd42ff0dc3a423e2d4c..a96c7db851db5e5ebbc61160f1a020df2ece07f9 100644 (file)
@@ -56,6 +56,9 @@ class DiffHunk(object):
         elif line[0] == " ":
             self.left.Append(line)
             self.right.Append(line)
+        elif line[0] == "\\":
+            # Ignore newline messages from git diff.
+            pass
         else:
             assert False, ("Unrecognized character at start of diff line "
                            "%r" % line[0])