Add the third-party Cargo.toml.orig files
These files are part of the crates downloaded from crates.io, and we
should include the entire contents of third-party packages. We have to
allow these files to be uploaded in PRESUBMIT.py as well.
They are already un-ignored in //third_party/rust/.gitignore.
[email protected], [email protected]
Change-Id: I6750a2380aa191eb143cb06745d9ebb9aaed9ddb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3260146
Reviewed-by: Adrian Taylor <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: danakj <[email protected]>
Cr-Commit-Position: refs/heads/main@{#937978}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 8f62b2b..332c7a4 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -4277,6 +4277,9 @@
def CheckPatchFiles(input_api, output_api):
problems = [f.LocalPath() for f in input_api.AffectedFiles()
if f.LocalPath().endswith(('.orig', '.rej'))]
+ # Cargo.toml.orig files are part of third-party crates downloaded from
+ # crates.io and should be included.
+ problems = [f for f in problems if not f.endswith('Cargo.toml.orig')]
if problems:
return [output_api.PresubmitError(
"Don't commit .rej and .orig files.", problems)]