apache / apache/cordova

[Plugins] Distribute better .gitattributes file to all repos

Open
#134 1 comment 0 reactions 0 assignees View on GitHub
plugins
Dominant language
No language data
Stars
710
Forks
75
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.