-
Notifications
You must be signed in to change notification settings - Fork 277
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
Normalized line endings from CRLF to LF #143
Conversation
Great that they are normalized. But why LF instead of CRLF? Is it Unity that does this? Can't it be configured? I would assume that the Windows style would make more sense. |
@Mizipzor Well yes it can be configured (link here) but Git is very picky about that because it was originally made for Unix systems, ie. Linux, from what i understand, and also it let's people from other systems like Mac and Linux contribute to the project. How to configure:
|
I wouldnt want to do it globally because I actually think it should be LF. I just meant for this project specifically. And maybe I have misunderstood Git but isn't it meant to have git convert it all when something is checked out or committed? Windows user does checkout, everything is coerced to CRLF, windows user submits CRLF but its converted to LF. |
I just checked, these files and all other files have CRLF for me. |
This conflicts with our "native EOL" CONTRIBUTION.md standards and the .gitattributes auto-eol configuration we implemented in #41. Your local git should pull files into your native eol for whichever system your on -- unless we've made a mistake somewhere. Try doing a fresh clone and check to see of the eol are right for your system. |
@quill18 I actually cant find a segment addressing the eol in the contributions file. Is it somewhere else? Or did I just miss it? |
@quill18 @2DemiGods I am still seeing this issue when making a fresh clone on OS X. The following files are downloading with CRLF (Windows) line endings, causing them to appear immediately as "changed":
Based on some Google-fu I think this behavior is caused by the files not having been recommitted after the settings change in #41, so they aren't marked for "auto" line endings in the repo. They download without the intelligent conversion, but when checking them against the previous commits git does convert the line endings first i.e. the local file has "auto" EOL while the repository file has explicit CRLF line endings. Windows users probably don't see an issue, since their line endings will match anyway, but users on *nix systems will show changes for freshly downloaded files. GitHub has a help article about it here: https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings. To preserve attribution this is probably something @quill18 should handle himself. |
@brlodi I have the same problem. I use the Msys2 Git client on Windows. Maybe @quill18 can try this, from Gitattributes Documentation:
|
Should be fixed in #187. As @henninglive pointed out:
|
So there was a problem with the repo itself! I learned something new today. :) |
This has led to an issue where after cloning, the repo would show unsaved changes even from a newly created fork.