mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
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 <denniskempin@google.com> Commit-Queue: Vikram Auradkar <auradkar@google.com>
This commit is contained in:
parent
01065a8286
commit
8dacb2ed64
4 changed files with 39 additions and 23 deletions
15
.gitattributes
vendored
Normal file
15
.gitattributes
vendored
Normal file
|
@ -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
|
|
@ -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:]
|
||||
|
||||
|
|
Loading…
Reference in a new issue