Permalink
Browse files

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)
  • Loading branch information...
1 parent fe53185 commit 687397335843f4c21a9bccb8f01cc257320db08f @SethTisue SethTisue committed Sep 18, 2015
Showing with 17 additions and 13 deletions.
  1. +17 −13 .gitattributes
View
@@ -2,20 +2,24 @@
# this must be first so later entries will override it
* text=auto
+# check out text files with lf, not crlf, on Windows. (especially
+# important for Scala source files, since """ preserves line endings)
+text eol=lf
+
# These files are text and should be normalized (convert crlf => lf)
-*.c text
-*.check text
-*.css text
-*.flags text
-*.html text
-*.java text
-*.js text
-*.policy text
-*.sbt text
-*.scala text
-*.sh text
-*.txt text
-*.xml text
+*.c eol=lf
+*.check eol=lf
+*.css eol=lf
+*.flags eol=lf
+*.html eol=lf
+*.java eol=lf
+*.js eol=lf
+*.policy eol=lf
+*.sbt eol=lf
+*.scala eol=lf
+*.sh eol=lf
+*.txt eol=lf
+*.xml eol=lf
# Windows-specific files get windows endings
*.bat eol=crlf

0 comments on commit 6873973

Please sign in to comment.