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

Add .gitattributes to repository #13479

Merged

Conversation

HertzDevil
Copy link
Contributor

This minimal .gitattributes does a few things:

  • Marks all Crystal source files as using LF for line endings. This prevents automatic end-of-line conversions on those files on checkouts even if core.autocrlf is not set. (CRLFs are normalized into LFs on checkins.)
  • Excludes markd and reply, compiler dependencies that we explicitly source in, from the repository stats.
  • Excludes several automatically generated files from diff views by default.
  • Allows GitHub to recognize Makefile.win as a Makefile and apply syntax highlighting.

In the future we should add *.cr text eol=lf to crystal init as well, as suggested in #5831 (comment) and #13304 (comment).

@straight-shoota straight-shoota added this to the 1.9.0 milestone May 22, 2023
@straight-shoota straight-shoota merged commit 0d6517c into crystal-lang:master May 23, 2023
@HertzDevil HertzDevil deleted the feature/gitattributes branch May 23, 2023 08:40
@Blacksmoke16
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants