Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: use text eol=lf #2658

Merged
merged 3 commits into from
Feb 11, 2024
Merged

infra: use text eol=lf #2658

merged 3 commits into from
Feb 11, 2024

Conversation

Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 commented Feb 10, 2024

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.

image

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.

@Shinigami92 Shinigami92 added the c: infra Changes to our infrastructure or project setup label Feb 10, 2024
@Shinigami92 Shinigami92 added this to the vAnytime milestone Feb 10, 2024
@Shinigami92 Shinigami92 self-assigned this Feb 10, 2024
@Shinigami92 Shinigami92 requested a review from a team as a code owner February 10, 2024 08:53
Copy link

codecov bot commented Feb 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cdf0bb6) 99.56% compared to head (d5ae8ee) 99.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2658   +/-   ##
=======================================
  Coverage   99.56%   99.57%           
=======================================
  Files        2807     2807           
  Lines      250526   250526           
  Branches     1148     1152    +4     
=======================================
+ Hits       249446   249456   +10     
+ Misses       1052     1042   -10     
  Partials       28       28           

see 1 file with indirect coverage changes

@ST-DDT ST-DDT added the p: 1-normal Nothing urgent label Feb 10, 2024
@ST-DDT ST-DDT requested review from a team February 10, 2024 11:15
@xDivisionByZerox xDivisionByZerox enabled auto-merge (squash) February 11, 2024 00:56
@xDivisionByZerox xDivisionByZerox merged commit 0e4b93f into next Feb 11, 2024
16 checks passed
@Shinigami92 Shinigami92 deleted the infra/gitattributes/text-eol branch February 11, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants