Skip to content

Commit 6873973

Browse files
committed
SI-9472 make Git use LF line endings on Windows
this is mostly intended for .scala files, since because """ preserves line endings, so we get different results if source files have CRLF. this was making a few tests fail on Windows (because they used """ to enclose expected output)
1 parent fe53185 commit 6873973

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.gitattributes

+17-13
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
# this must be first so later entries will override it
33
* text=auto
44

5+
# check out text files with lf, not crlf, on Windows. (especially
6+
# important for Scala source files, since """ preserves line endings)
7+
text eol=lf
8+
59
# These files are text and should be normalized (convert crlf => lf)
6-
*.c text
7-
*.check text
8-
*.css text
9-
*.flags text
10-
*.html text
11-
*.java text
12-
*.js text
13-
*.policy text
14-
*.sbt text
15-
*.scala text
16-
*.sh text
17-
*.txt text
18-
*.xml text
10+
*.c eol=lf
11+
*.check eol=lf
12+
*.css eol=lf
13+
*.flags eol=lf
14+
*.html eol=lf
15+
*.java eol=lf
16+
*.js eol=lf
17+
*.policy eol=lf
18+
*.sbt eol=lf
19+
*.scala eol=lf
20+
*.sh eol=lf
21+
*.txt eol=lf
22+
*.xml eol=lf
1923

2024
# Windows-specific files get windows endings
2125
*.bat eol=crlf

0 commit comments

Comments
 (0)