2024-11-13 02:20:40 -05:00
|
|
|
# By default, detect text files automatically, and use whatever line terminators make sense for the OS
|
2024-11-13 10:43:34 -05:00
|
|
|
* text=auto eol=lf
|
2024-11-13 02:20:40 -05:00
|
|
|
|
|
|
|
# Java files are text, and we want Java-friendly readable hunk headers for diff
|
2024-11-13 10:43:34 -05:00
|
|
|
*.java text diff=java eol=lf
|
2024-11-13 02:20:40 -05:00
|
|
|
|
|
|
|
# Force LF/CRLF format for files that are known to require it.
|
|
|
|
*.sh text eol=lf
|
|
|
|
*.bat text eol=crlf
|
|
|
|
|
|
|
|
# For some reason the above is not enough, in particular for gradlew.bat,
|
|
|
|
# as some commands (git status, git add --renormalize) will still change its line endings to LF.
|
|
|
|
# So, we explicitly tell git not to mess with *.bat line endings.
|
|
|
|
# It's annoying as git won't show diffs for these files anymore,
|
|
|
|
# but that's the best I could come up with after an hour of head-scratching.
|
|
|
|
*.bat binary
|
|
|
|
|