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

Default .gitattributes for crystal init #13480

Open
HertzDevil opened this issue May 17, 2023 · 0 comments
Open

Default .gitattributes for crystal init #13480

HertzDevil opened this issue May 17, 2023 · 0 comments

Comments

@HertzDevil
Copy link
Contributor

#13479 adds a .gitattributes to this repository. It would be helpful if new projects also do the same.

The main thing to add is:

*.cr text eol=lf

It ensures that checkins convert CRLF to LF (although there shouldn't be any as long as one runs the formatter) and checkouts preserve line endings, even without having to set core.autocrlf. If for some reason we want to preserve line endings on checkins as well, it would be *.cr -text instead.

That's about it because the lib directory is ignored; shard repositories do not source in dependencies like Crystal itself does.

@HertzDevil HertzDevil changed the title Default gitattributes for crystal init Default .gitattributes for crystal init May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant