Support diffs with no EOF newline
Change-Id: I0366979e061db63f6950d8421f0a125a2fc6d1b1
diff --git a/presubmit_support.py b/presubmit_support.py
index d2c7097..0249340 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -677,7 +677,8 @@
continue
if line.startswith('+') and not line.startswith('++'):
self._cached_changed_contents.append((line_num, line[1:]))
- if not line.startswith('-'):
+ if (not line.startswith('-') and not
+ line.startswith('\ No newline at end of file')):
line_num += 1
return self._cached_changed_contents[:]