]> cat aescling's git repositories - mastodon.git/commitdiff
Add .gitattributes file to avoid unwanted CRLF (#3954)
authorDaniel Hunsaker <danhunsaker@gmail.com>
Mon, 26 Jun 2017 11:15:24 +0000 (05:15 -0600)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 26 Jun 2017 11:15:24 +0000 (13:15 +0200)
When Windows checks out files, it defaults to changing line endings to CRLF. If these files are then copied to a Linux system to be run, and the endings aren't changed at some point in that process, things break. This file forces git to use LF for all text files on all systems (except the request testing specfiles) to prevent issues everywhere.

.gitattributes [new file with mode: 0644]

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..e69f2a0
--- /dev/null
@@ -0,0 +1,14 @@
+*                             text=auto eol=lf
+*.eot                         -text
+*.gif                         -text
+*.gz                          -text
+*.ico                         -text
+*.jpg                         -text
+*.mp3                         -text
+*.ogg                         -text
+*.png                         -text
+*.ttf                         -text
+*.webm                        -text
+*.woff                        -text
+*.woff2                       -text
+spec/fixtures/requests/**     -text !eol