1
0
mirror of https://github.com/gitattributes/gitattributes.git synced 2025-01-22 00:08:52 -05:00

Rebalance Java and Common

Remove duplicated rules from `Java`, and move those that make sense to
`Common`. This way both rules files can be used together, and the
settings for more generic files like shell scripts, JSON, YAML can be
more easily applied to other types of projects.

Add settings that ensure Windows based scripts (`.bat` and `.cmd`) end
with CRLF.
This commit is contained in:
mig4 2019-07-13 21:06:52 +01:00
parent aa3d5837de
commit b7c0d53361
No known key found for this signature in database
GPG Key ID: 6CD3E1B61579CB43
2 changed files with 27 additions and 17 deletions

View File

@ -28,6 +28,7 @@
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
# Graphics
@ -46,6 +47,28 @@
*.eps binary
# Scripts
*.bash text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
# Serialisation
*.json text
*.yaml text
*.yml text
# Archives
*.7z binary
*.gz binary
*.tar binary
*.zip binary
#
# Exclude files from exporting
#

View File

@ -1,41 +1,28 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
# Java sources
*.java text diff=java
*.gradle text diff=java
*.gradle.kts text diff=java
#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.bash text eol=lf
*.css text diff=css
*.df text
*.htm text diff=html
*.html text diff=html
*.java text diff=java
*.js text
*.json text
*.jsp text
*.jspf text
*.jspx text
*.properties text
*.sh text eol=lf
*.tld text
*.txt text
*.tag text
*.tagx text
*.xml text
*.yml text
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.gif binary
*.ico binary
*.jar binary
*.jpg binary
*.jpeg binary
*.png binary
*.so binary
*.war binary