Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was random a comment from a user 38e890e#commitcomment-138490557 that hinted me to that line of code. I wasn't even aware that we have this configured, as it is from v4.0.0.
I switched the behavior slightly but also upgraded out of a legacy syntax.
The real direct equivalent would be
* -text
, but this would have the downside that it only affects when checking files out.The
* text eol=lf
is different in that way that it affects the files when you checkin files to the repo. Resulting in new created files directly with the "correct" lf ending. However in most files prettier would do that for us anyway, so only files that are NOT supported by prettier would be affected.We have some png files in the docs.
Adding
*.png binary
fixed that.And here you instantly see in action the difference 🙂
As png are not supported by prettier, it would not add eol=lf to such files when checkin in, and that was previously not the case.
Now the gitattributes are more verbose and specific.