Skip to content

Line endings should be consistent #1126

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

Closed
holgerfriedrich opened this issue Jul 25, 2022 · 4 comments
Closed

Line endings should be consistent #1126

holgerfriedrich opened this issue Jul 25, 2022 · 4 comments

Comments

@holgerfriedrich
Copy link
Contributor

Currently, text files (java, etc) use a different line endings (CR/CRLF), and some files contain a mix of both.
Working on #1121, I have trouble setting up spotless. The tool always tries to reformat nearly half of the codebase :-)

For java files, there are ~800 out of 1300 files using CRLF style.
Typically the convention is to use LF in the git repo and let git automatically decide on checkout depending on the target platform.

My recommendation would be to use text=auto feature in .gitattributes file to enable automatic conversion. However, this does not help for the files in the repo using CRLF format. It would require a huge commit fixing all the files, and basically rendering "git blame" useless, as this would always point to this commit. I see not other option, as rewriting the commit history is not a good way for a public repo anyway.

Any ideas on this, @AutonomicPerfectionist ?

@AutonomicPerfectionist
Copy link
Contributor

@holgerfriedrich line endings and messing with git are not my forte, unfortunately. I suggest you join the discord (https://discord.gg/AfScp5x8r5) to talk with the more experienced developers or ping them here (supertick, kwatters, etc.)

@holgerfriedrich holgerfriedrich closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
@supertick supertick reopened this Jun 15, 2024
@supertick
Copy link
Contributor

Haven't seen this until now.
It's relatively stable and to my knowledge there aren't any large development tasks that have been branched off currently.
So, now would be the time to do it.
We've had major commits like this in the past when we processed the whole project under eclipse.
It's preferable to put all files in one format, and better if we can keep it that way. "git blame" will be come useful again at some point.

@supertick
Copy link
Contributor

#1427
If the auto-elves pass the build it will get merged

@supertick
Copy link
Contributor

merged

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

No branches or pull requests

3 participants