-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: renormalize line endings in gradlew.bat #180
Conversation
I wonder why it affects only Mac, not Linux 🤔 . But maybe it's right ahead of me ;-). |
|
In any case, the flow is the same: one needs to add |
But then this PR shows that you've changed all CRLF to LF in the repository, how is it going to work on Windows where Batch interpreter cannot handle LF? |
Ok, other than being extremely confused, this is actually necessary. It affects me as well, just didn't see it. When I add the remote and checkout vlsi's branch it works fine, and when re-cloning his fork it also works fine. (I'm on Windows btw.) |
Note: if you download https://raw.githubusercontent.com/vlsi/publish-plugin/renormalize/gradlew.bat, it has LF characters in it. If you download https://github.com/vlsi/publish-plugin/archive/refs/heads/renormalize.zip, it has CRLF characters correctly. Is this a bug with the raw endpoint then? |
TLDR: Git converts EOL on checkout. They recommend using Git stores text files in LF format, and it converts them on checkout. |
I my other projects, I also use |
Thanks for the info, really helpful!
I just had way too many problems with this, some files would be committed with LF some with CRLF, depending on which tool created them. So I just turned it off and rely on whatever is in the repo. IDEA also nicely warns me when I (accidentally) commit CRLF. |
This is a result of running
git add . --renormalize
: https://stackoverflow.com/a/47580886/1261287Without this PR, macOS shows
gradlew.bat
as always modified