summaryrefslogtreecommitdiff
path: root/tools/diff.py
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2014-02-03 12:15:17 -0800
committerJohann <johannkoenig@google.com>2014-02-04 15:24:02 -0800
commitf498d92ff4686c2b1bfba87b3e44987ef87a66e7 (patch)
tree0faf50932569523c8181b4c187c31a355821f276 /tools/diff.py
parent37e5325b9f985e7ce1cd8a128b9bebafded60f40 (diff)
downloadlibvpx-f498d92ff4686c2b1bfba87b3e44987ef87a66e7.tar
libvpx-f498d92ff4686c2b1bfba87b3e44987ef87a66e7.tar.gz
libvpx-f498d92ff4686c2b1bfba87b3e44987ef87a66e7.tar.bz2
libvpx-f498d92ff4686c2b1bfba87b3e44987ef87a66e7.zip
Ignore missing newline message
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
Diffstat (limited to 'tools/diff.py')
-rw-r--r--tools/diff.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/diff.py b/tools/diff.py
index a42a4dc7c..a96c7db85 100644
--- a/tools/diff.py
+++ b/tools/diff.py
@@ -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])