-
-
Notifications
You must be signed in to change notification settings - Fork 365
Fix line endings to newline #452
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
Comments
I played with this a little bit on a local branch, and the change itself is pretty straightforward. Though after the fact, every stage you perform, you're going to get warnings about CRLF to LF conversions. I'd be curious to see how typical it is to deviate away from text=auto, which should handle it for us. |
@jpreese Hmmm, if it proves to be more of a nuisance than a boon, we should just skip it. |
Yeah I'd need to look into it more, but it's my understanding that I then looked at a random sampling of repositories and really couldn't find any that explicitly set LF. |
Okay, let's close this then. |
The problem was that my git changed some files that had CRLF instead of LF. Some Windows user must’ve accidentally created those. My point is, if it happened once, maybe it’ll happen again. Better enforce the LF everywhere so that we don’t get spurious file changes when git notices CRLF and decides to normalize it. |
Well, I've tried to reproduce this on my Mac but have failed. So I suspect it might be some environment-specific issue with your machine. If more people have this issue, we can always re-open. |
I actually encountered the same problem @felix91gr did with those two specific files in the I tried changing my global config autoclrf (which was originally set to
Every time I changed the setting, I removed the directory and recloned it, but as soon as a cloned it would say I had changed the line endings in those two files. I made sure it was only line endings comparing the The only thing I remember doing to solve it (my fork was 3 commits behind at the time since it was based off of My environment is windows. Using VSCode and VS2017.3. |
About
|
I'm not opposed to changing those couple of files. Those could have gotten in a wonky state from who knows how long ago. My stance is that if we change .gitattributes to force LF, every stage from there on out will have this warning and it'll probably take some local finagling to get them to go away. If we fix those files, the text=auto property that already exists should handle everything gracefully for us. |
Should I let the change propagate from my original PR? Or should I make a new one for this?
How so? I'm missing something. But here:
You are right. This shouldn't happen again for a long time anyways :) |
|
Oh shit. That's no good.
Oki doke. I'll make another one then, and after that I'll finish the Difference of Squares PR without having to hack around with |
You're more than welcome to follow those steps and play with it yourself. I really haven't explicitly set |
Fixed this in #461 👍 |
To prevent cross-platform issues, we should use
\n
for all our source code files, both for exercises and generators, as well as generated test files.The text was updated successfully, but these errors were encountered: