From 8dacb2ed6433c61c22c70f7f1b637f08fdbea851 Mon Sep 17 00:00:00 2001 From: Vikram Auradkar Date: Mon, 6 Nov 2023 13:27:42 -0800 Subject: [PATCH] config: force lf as line endings this allows sharing repo on windows running a linux container BUG=b:308883445 TEST=on windows ran py .\tools\dev_container tools/presubmit line_endings Change-Id: Ief73f1ad2da201dac0337711d0c4f706a936f7a6 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5008193 Reviewed-by: Dennis Kempin Commit-Queue: Vikram Auradkar --- .gitattributes | 15 ++++++++++++ third_party/libslirp-rs/LICENSE | 42 ++++++++++++++++----------------- tools/custom_checks | 3 ++- tools/windows/build_test | 2 +- 4 files changed, 39 insertions(+), 23 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..29d8e5b9dc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +*.rs text eol=lf +*.py text eol=lf +*.js text eol=lf +*.md text eol=lf +*.toml text eol=lf +*.lock text eol=lf +*.proto text eol=lf +.dockerignore text eol=lf +*.json text eol=lf +*.h text eol=lf +.gitignore text eol=lf +.gitmodules text eol=lf +.yml text eol=lf +config text eol=lf +*.svg text eol=lf diff --git a/third_party/libslirp-rs/LICENSE b/third_party/libslirp-rs/LICENSE index d928926863..1aa4dfd263 100644 --- a/third_party/libslirp-rs/LICENSE +++ b/third_party/libslirp-rs/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2019-2020 Red Hat, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2019-2020 Red Hat, Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/custom_checks b/tools/custom_checks index 23add21968..265624ce8c 100755 --- a/tools/custom_checks +++ b/tools/custom_checks @@ -45,6 +45,7 @@ CRLF_LINE_ENDING_FILES: List[str] = [ "**.bat", "**.ps1", "e2e_tests/tests/goldens/backcompat_test_simple_lspci_win.txt", + "tools/windows/build_test", ] @@ -59,7 +60,7 @@ def check_line_endings(*files: str): "Checks line endings. Windows only files are using clrf. All others just lf." for line in cmd("git ls-files --eol", *files).lines(): parts = line.split() - file = parts[3] + file = parts[-1] index_endings = parts[0][2:] wdir_endings = parts[1][2:] diff --git a/tools/windows/build_test b/tools/windows/build_test index 25daf028ad..2238803377 100644 --- a/tools/windows/build_test +++ b/tools/windows/build_test @@ -1 +1 @@ -python3 tools/windows/build_test.py +python3 tools/windows/build_test.py