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
Windows with WSL2 manual git clone installation method, wrong line endings #1517
Comments
Hi, thanks for the note! I think a gitattributes file would be a nice addition if that would help WSL users. You're welcome to send a PR. Do you know why a |
Most likely this is when one has used Git installer for windows at one point that way wsl inherits, though i can confirm on a default Debian WSL install on windows 10, using in-wsl installed git. installing rbenv though git clone yields:
I encountered this now with a working rbenv + rbenv-build already setup. i was attempting to install 3.3.0 - which did not work due to missing files, so i performed git pull within both ~/.rbenv and ~/.rbenv/plugins/rbenv-build/ and i now have this issue. Here is my playback:
As you can see, this kicks in directly after cloning, but when setting the git config you can see the problem is resolved. |
Side note, this can also occur because in WSL2 as opposed to WSL1, you actually have a network drive, so that drive is actually mounted as a browsable drive in windows. That might be the cause of certain file manifests now behaving like it was windows. This was not the case in WSL1. |
Thanks for the sleuthing! If you can check: before you've done
I'm just trying to wrap my head around why would an in-WSL installed Git want to default to CRLF line endings. Did it inherit a |
Ran into an issue when installing via the
git clone
method (due to the linux apt install method not providing up-to-date ruby versions) where the end of the files lines were for windows instead of linux.The work around was to set a flag
-c core.autocrlf=false
when doing the git clone, ex:git clone -c core.autocrlf=false https://github.com/rbenv/rbenv.git ~/.rbenv
.I think if the
.gitattribues
file gets modified to include atext eol=lf
line it should help others down the line. At the very least updating the readme to include a section for Windows/WSL folks installing via the clone method would be helpful.Side note: also when installing via the clone method, the install command did not work, so the ruby-build plugin needed to be installed manually, where the same flag is probably needed (not verified).
The text was updated successfully, but these errors were encountered: