mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-19 19:42:17 +02:00
Prevent CRLF line endings
* Set .gitattributes to automatically detect text files, enabling git to remove CRLF. * Keep CRLF for .bat files * Use .editorconfig to avoid further introduction of CRLF
This commit is contained in:
parent
ece272e7af
commit
1feb8b31b8
@ -0,0 +1,5 @@
|
||||
[*]
|
||||
end_of_line = lf
|
||||
|
||||
[*.bat]
|
||||
end_of_line = crlf
|
48
.gitattributes
vendored
48
.gitattributes
vendored
@ -1,8 +1,52 @@
|
||||
*.bat text
|
||||
*.csv text
|
||||
# For each file not matching a pattern listed below, let git automatically
|
||||
# detect whether it's a text file. If it is, use LF end of lines.
|
||||
# Last match resolves, so we place the catch-all at the top of the file.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Text file whose eol is not specified defaults to LF. We only need to
|
||||
# explicitly specify when we want CRLF.
|
||||
*.awk text
|
||||
*.bat text eol=crlf
|
||||
*.css text
|
||||
*.csv text
|
||||
*.gradle text
|
||||
*.html text
|
||||
*.java text
|
||||
*.js text
|
||||
*.json text
|
||||
*.kt text
|
||||
*.kts text
|
||||
*.md text
|
||||
*.py text
|
||||
*.sh text
|
||||
*.sql text
|
||||
*.toml text
|
||||
*.ts text
|
||||
*.txt text
|
||||
*.xml text
|
||||
*.yaml text
|
||||
*.yml text
|
||||
|
||||
# Files we want to diff, but not change the line endings.
|
||||
*.anki2 -text
|
||||
*.crt -text
|
||||
*.svg -text
|
||||
|
||||
# Binary and compiled files. We want to neither diff nor alter these files.
|
||||
*.apkg binary
|
||||
*.gz binary
|
||||
*.jar binary
|
||||
*.mp4 binary
|
||||
*.mwb binary
|
||||
*.png binary
|
||||
*.psd binary
|
||||
*.tgz binary
|
||||
*.ttf binary
|
||||
*.webm binary
|
||||
*.woff binary
|
||||
*.xcf binary
|
||||
*.zip binary
|
||||
|
||||
# Tell GitHub that this file is not auto-generated, and should be displayed
|
||||
# in diffs.
|
||||
.idea/dictionaries/*.xml linguist-generated=false
|
Loading…
Reference in New Issue
Block a user