summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-09-18 14:41:40 -0400
committerSeth Tisue <seth@tisue.net>2015-09-25 11:35:31 -0400
commit687397335843f4c21a9bccb8f01cc257320db08f (patch)
treeb5e3ee152e02edb3edd78e0f1a15f21889a31757 /.gitattributes
parentfe53185d8d78a127ec353cd7e6ca841d6b04b5c3 (diff)
downloadscala-687397335843f4c21a9bccb8f01cc257320db08f.tar.gz
scala-687397335843f4c21a9bccb8f01cc257320db08f.tar.bz2
scala-687397335843f4c21a9bccb8f01cc257320db08f.zip
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)
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes30
1 files changed, 17 insertions, 13 deletions
diff --git a/.gitattributes b/.gitattributes
index ac98781b3d..da4421cb78 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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