diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 7575948a2c..922f3cdeca 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -795,6 +795,7 @@ def CommonChecks(input_api, output_api): non_third_party_sources = lambda x: input_api.FilterSourceFile(x, black_list=third_party_filter_list) + results.extend(CheckNoGitRepoInThirdParty(input_api, output_api)) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, maxlen=80, source_file_filter=eighty_char_sources)) results.extend(input_api.canned_checks.CheckLongLines( @@ -834,6 +835,17 @@ def CommonChecks(input_api, output_api): return results +def CheckNoGitRepoInThirdParty(input_api, output_api): + if os.path.isdir(input_api.os_path.join( + input_api.PresubmitLocalPath(), 'third_party', '.git')): + return [output_api.PresubmitError("Please remove third_party/.git " + "directory. This error means that " + "possibly you also have to apply other " + "instructions from the May 11th PSA from " + "titovartem@.")] + return [] + + def CheckThirdPartyChanges(input_api, output_api): with _AddToPath(input_api.os_path.join( input_api.PresubmitLocalPath(), 'tools_webrtc', 'presubmit_checks_lib')):