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

Problem with line endings while committing to OpenPonk repositories #51

Open
hernanmd opened this issue Jun 18, 2021 · 1 comment
Open

Comments

@hernanmd
Copy link

Probably it's me but I tried two commits from Pharo 9, one from macOS and another one from Windows, and in both cases the line endings are always taken into account when comparing diff:

This is a commit from Windows:

hernanmd@e3824fe

The OpenPonk repositories are the only ones where I have this problem.
Should I set something else before committing to this repo?

@JanBliznicenko
Copy link
Member

JanBliznicenko commented Jul 21, 2021

Hello, thank you for noticing the problem. It seems some files have Windows and some Unix line endings (CRLF vs LF). Those causing you problems are ones with LFs (Unix-like) that are being replaced by CRLFs (Windows-like) by your git. There is no easy solution to this, as we (even I myself) develop in both Linux and Windows. It needs to be unified. Although you have problems with ones with LFs, git proposes using LFs via autocrlf setting and Pharo project itself uses LFs. That leads me to beliving that OpenPonk repo should switch to LFs as well, therefore I switched whole repository to LFs. The way to go from here would be now using autocrlf setting in git that should handle this issue. I actually wonder why have you not encountered same issue on any other project, as it is expected to hapen in any crossplatform project. Pharo/Iceberg itself generates files with line endings for the specific platform.

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

2 participants