Skip to content

Commit 0b906ae

Browse files
author
Erlend Egeberg Aasland
authored
Use git attribute macros for CRLF and no-EOL files (GH-30762)
1 parent cec5d85 commit 0b906ae

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.gitattributes

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,27 @@ Lib/test/sndhdrdata/sndhdr.* binary
2222
PC/classicAppCompat.* binary
2323

2424
# Text files that should not be subject to eol conversion
25-
Lib/test/cjkencodings/* -text
26-
Lib/test/decimaltestdata/*.decTest -text
27-
Lib/test/test_email/data/*.txt -text
28-
Lib/test/xmltestdata/* -text
29-
Lib/test/coding20731.py -text
30-
Lib/test/test_importlib/data01/* -text
31-
Lib/test/test_importlib/namespacedata01/* -text
25+
[attr]noeol -text
26+
27+
Lib/test/cjkencodings/* noeol
28+
Lib/test/coding20731.py noeol
29+
Lib/test/decimaltestdata/*.decTest noeol
30+
Lib/test/test_email/data/*.txt noeol
31+
Lib/test/test_importlib/data01/* noeol
32+
Lib/test/test_importlib/namespacedata01/* noeol
33+
Lib/test/xmltestdata/* noeol
3234

3335
# CRLF files
34-
*.bat text eol=crlf
35-
*.ps1 text eol=crlf
36-
*.sln text eol=crlf
37-
*.vcxproj* text eol=crlf
38-
*.props text eol=crlf
39-
*.proj text eol=crlf
40-
PCbuild/readme.txt text eol=crlf
41-
PC/readme.txt text eol=crlf
36+
[attr]dos text eol=crlf
37+
38+
*.bat dos
39+
*.proj dos
40+
*.props dos
41+
*.ps1 dos
42+
*.sln dos
43+
*.vcxproj* dos
44+
PC/readme.txt dos
45+
PCbuild/readme.txt dos
4246

4347
# Language aware diff headers
4448
# https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more

0 commit comments

Comments
 (0)