From 6aea1fe0f441928bf60b2e48676c4ebe0455fea9 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 14 Nov 2022 20:42:33 +0100 Subject: [PATCH 1/5] Switch default line endings to LF --- .gitattributes | 49 ++++++++++--------------------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/.gitattributes b/.gitattributes index a5096e90..72f06abb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,31 +1,13 @@ -# Set default file-type attributes +# All file types: +# - Treat as text +# - Normalize to LF line endings +* text eol=lf -# All file types -* text=auto - -# Markups -*.md text=auto diff=markdown -*.mdx text=auto diff=markdown - -# Solutions -*.sln text=auto eol=crlf -*.slnx text=auto - -# Projects -*.*proj text=auto -*.tasks text=auto -*.props text=auto -*.targets text=auto - -# Sources -*.cs text=auto diff=csharp -*.csx text=auto diff=csharp -*.fs text=auto diff=fsharp -*.resx text=auto - -# Scripts -*.in text eol=lf -*.sh text eol=lf +# Solution files and Windows scripts +# - Treat as text +# - Force to CRLF line endings (Windows-style) +*.sln text eol=crlf +*.slnf text eol=crlf *.bat text eol=crlf *.cmd text eol=crlf @@ -37,15 +19,4 @@ # Keys *.snk binary *.pfx binary -*.cer binary - -# Others - -# Preserve Line endings in diff and patch files -*.diff -text -*.patch -text - -# Exclude git meta files from exporting -.gitattributes export-ignore -.gitignore export-ignore -.gitkeep export-ignore \ No newline at end of file +*.cer binary \ No newline at end of file From 1af5a5e94899e01f438298e34377d3d4916a5292 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 14 Nov 2022 21:12:51 +0100 Subject: [PATCH 2/5] Update .gitattributes Remove unnecessary directive in .gitattributes Co-authored-by: Youssef Victor --- .gitattributes | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 72f06abb..f693bcc3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,13 +3,35 @@ # - Normalize to LF line endings * text eol=lf -# Solution files and Windows scripts +# Explicit settings for well known types +*.appxmanifest text eol=lf +*.cmd text eol=lf +*.config text eol=lf +*.cs text eol=lf +*.csproj text eol=lf +*.fs text eol=lf +*.fsproj text eol=lf +*.hlsl text eol=lf +*.json text eol=lf +*.manifest text eol=lf +*.md text eol=lf +*.msbuildproj text eol=lf +*.projitems text eol=lf +*.props text eol=lf +*.ps1 text eol=lf +*.resx text eol=lf +*.sh text eol=lf +*.shprroj text eol=lf +*.slnf text eol=lf +*.targets text eol=lf +*.xaml text eol=lf +*.txt text eol=lf +*.yml text eol=lf + +# Solution files # - Treat as text # - Force to CRLF line endings (Windows-style) *.sln text eol=crlf -*.slnf text eol=crlf -*.bat text eol=crlf -*.cmd text eol=crlf # Images *.png binary From 603ce2035bd173dff5bf579cfc60a2be5e16614f Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 14 Nov 2022 21:30:20 +0100 Subject: [PATCH 3/5] Add missing extensions to .gitattributes --- .gitattributes | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitattributes b/.gitattributes index f693bcc3..88258636 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ # All file types: # - Treat as text # - Normalize to LF line endings -* text eol=lf +* text=auto eol=lf # Explicit settings for well known types *.appxmanifest text eol=lf @@ -31,14 +31,17 @@ # Solution files # - Treat as text # - Force to CRLF line endings (Windows-style) -*.sln text eol=crlf +*.sln text eol=crlf # Images -*.png binary -*.jpg binary -*.gif binary +*.png binary +*.jpg binary +*.gif binary # Keys -*.snk binary -*.pfx binary -*.cer binary \ No newline at end of file +*.snk binary +*.pfx binary +*.cer binary + +# Other binary files +*.dll binary \ No newline at end of file From abc9f00341a65adba2cc5810195900efd78ac260 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 14 Nov 2022 22:56:56 +0100 Subject: [PATCH 4/5] Set LF endings in .editorconfig files --- .editorconfig | 1 + src/TerraFX.Interop.Windows.D2D1/.editorconfig | 1 + src/TerraFX.Interop.Windows.Dynamic/.editorconfig | 1 + src/TerraFX.Interop.Windows/.editorconfig | 1 + 4 files changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index 7d5239b3..343ced3a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,7 @@ indent_size = 4 indent_style = space # New line preferences +end_of_line = lf insert_final_newline = false trim_trailing_whitespace = true diff --git a/src/TerraFX.Interop.Windows.D2D1/.editorconfig b/src/TerraFX.Interop.Windows.D2D1/.editorconfig index 49462f73..3418bdfa 100644 --- a/src/TerraFX.Interop.Windows.D2D1/.editorconfig +++ b/src/TerraFX.Interop.Windows.D2D1/.editorconfig @@ -13,6 +13,7 @@ indent_size = 4 indent_style = space # New line preferences +end_of_line = lf insert_final_newline = false trim_trailing_whitespace = true diff --git a/src/TerraFX.Interop.Windows.Dynamic/.editorconfig b/src/TerraFX.Interop.Windows.Dynamic/.editorconfig index 49462f73..3418bdfa 100644 --- a/src/TerraFX.Interop.Windows.Dynamic/.editorconfig +++ b/src/TerraFX.Interop.Windows.Dynamic/.editorconfig @@ -13,6 +13,7 @@ indent_size = 4 indent_style = space # New line preferences +end_of_line = lf insert_final_newline = false trim_trailing_whitespace = true diff --git a/src/TerraFX.Interop.Windows/.editorconfig b/src/TerraFX.Interop.Windows/.editorconfig index 49462f73..3418bdfa 100644 --- a/src/TerraFX.Interop.Windows/.editorconfig +++ b/src/TerraFX.Interop.Windows/.editorconfig @@ -13,6 +13,7 @@ indent_size = 4 indent_style = space # New line preferences +end_of_line = lf insert_final_newline = false trim_trailing_whitespace = true From fb18d4668ac5db78a6e82ccb9b05070be8256a79 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 14 Nov 2022 23:11:07 +0100 Subject: [PATCH 5/5] Switch .sln files to LF too --- .gitattributes | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 88258636..11c80bd7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,17 +22,13 @@ *.resx text eol=lf *.sh text eol=lf *.shprroj text eol=lf +*.sln text eol=lf *.slnf text eol=lf *.targets text eol=lf *.xaml text eol=lf *.txt text eol=lf *.yml text eol=lf -# Solution files -# - Treat as text -# - Force to CRLF line endings (Windows-style) -*.sln text eol=crlf - # Images *.png binary *.jpg binary