Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index 726983027ce5b65fa935996bc4a87b149038326c..c68a46882d856fab113a7feeb9beb46b83ce6a4e 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -189,11 +189,12 @@ def _CheckLGTMsForPublicAPI(input_api, output_api): |
""" |
results = [] |
requires_owner_check = False |
- for affected_svn_file in input_api.AffectedFiles(): |
- affected_file_path = affected_svn_file.AbsoluteLocalPath() |
+ for affected_git_file in input_api.AffectedFiles(): |
borenet
2014/08/26 18:50:06
Why not just affected_file?
rmistry
2014/08/26 18:59:39
Not sure, it felt good to replace svn with git. Do
|
+ affected_file_path = affected_git_file.LocalPath() |
file_path, file_ext = os.path.splitext(affected_file_path) |
- # We only care about files that end in .h and are under the include dir. |
- if file_ext == '.h' and 'include' in file_path.split(os.path.sep): |
+ # We only care about files that end in .h and are under the top-level |
+ # include dir. |
+ if file_ext == '.h' and 'include' == file_path.split(os.path.sep)[0]: |
borenet
2014/08/26 18:50:05
os.path.dirname?
rmistry
2014/08/26 18:59:39
That will not work because for paths like 'include
|
requires_owner_check = True |
if not requires_owner_check: |