Commit 7ccb4bb8 authored by maruel@chromium.org's avatar maruel@chromium.org

Blacklist .diff and .patch files

Otherwise, silly checks like EOL whitespace triggers constantly.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8494013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@108899 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b322b3c
......@@ -216,6 +216,9 @@ class InputApi(object):
# SCM (can happen in dual SCM configuration). (Slightly over aggressive)
r"(|.*[\\\/])\.git[\\\/].*",
r"(|.*[\\\/])\.svn[\\\/].*",
# There is no point in processing a patch file.
r".+\.diff$",
r".+\.patch$",
)
def __init__(self, change, presubmit_path, is_committing,
......
......@@ -1020,6 +1020,8 @@ class InputApiUnittest(PresubmitTestsBase):
f('b.c/.git'),
f('a/.git/bleh.py'),
f('.git/bleh.py'),
f('bleh.diff'),
f('foo/bleh.patch'),
],
[
# Expected.
......@@ -1031,7 +1033,7 @@ class InputApiUnittest(PresubmitTestsBase):
self.mox.ReplayAll()
self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 21)
self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 9)
self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 11)
for item in files:
results = filter(input_api.FilterSourceFile, item[0])
for i in range(len(results)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment