apache / cordova

Apache Cordova
https://cordova.apache.org/
618 stars 64 forks source link

[Plugins] Distribute better .gitattributes file to all repos #134

Open janpio opened 5 years ago

janpio commented 5 years ago

Seems a minimal .gitattributes might not be such a good idea:

* text eol=lf

This can also cause edits to clearly binary files, otherwise as expected git is not smart enough to know that .png for example should keep its line ending.

This seems to be a better file:

* text eol=lf

#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary

Some projects even have a list of explicitly text files that should be touched, but I can't imagine that this is also necessary: https://github.com/apache/cordova-ios/blob/master/.gitattributes

janpio commented 5 years ago

Some plugins are still completely missing this file, so this will also be covered: https://github.com/apache/cordova-plugin-vibration https://github.com/apache/cordova-plugin-splashscreen