Skip to content

Comments

Add .gitattributes to repository#13479

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/gitattributes
May 23, 2023
Merged

Add .gitattributes to repository#13479
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/gitattributes

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