diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1c23898820c..6ab44640b47e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -232,6 +232,7 @@ repos: .bazelversion| .github/pull_request_template.md| .python-version| + LICENSE.*| compile_flags.txt| github_tools/requirements.txt| third_party/.*| diff --git a/scripts/sync_repos.sh b/scripts/sync_repos.sh index 20c125c8d517..dbceb23d5371 100755 --- a/scripts/sync_repos.sh +++ b/scripts/sync_repos.sh @@ -44,10 +44,13 @@ for dir in "${!MIRRORS[@]}"; do git rm --ignore-unmatch -r . git status + # Restore the license file. The mirrors use the Apache 2.0 license, which is + # compatible with our license but excludes the LLVM exception. + git checkout HEAD LICENSE + # Copy the basic framework from the origin repository. cp "$ORIGIN_DIR/.gitignore" \ "$ORIGIN_DIR/CODE_OF_CONDUCT.md" \ - "$ORIGIN_DIR/LICENSE" \ . # Copy the mirrored directory. We use `rsync` to get a more reliable way of