-
Hi! First, let me just say: THANK YOU SO MUCH FOR THIS. It's saved me a ton of time already. While implementing testing on WSL, I ran into the bizarre error This is because this runs Linux on top of Windows, so
There's an open bug about it: actions/checkout#135 / https://github.community/t/git-config-core-autocrlf-should-default-to-false/16140/7 but Github doesn't seem interested in fixing it; I bet this is a pretty common gotcha specifically when using WSL, so do you think you could document it in your docs? I see you're very aware of the issue but like most people I had no clue I would run into it until it showed up in my logs, and it took even longer to figure out I needed to add I see people in those threads, including you, recommending
That's certainly a fix, but my problem comes narrowly from trying to layer Linux on top of Windows, and with docker in the mix. In 99.99% of WSL installs, our users are going to be installing using git from inside WSL, so the glitch will never show up. It's only because CI's |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I had a similar issue as well, and I used the gitattributes fix. |
Beta Was this translation helpful? Give feedback.
-
Hey there, sorry for the long delay. I'm sorry, but I don't think I'll add that to the documentation of the action. This is a general Git issue. I simply think this is out of scope of the documentation for my action. But I'll move this issue to the discussions section instead of closing it for better discoverability. |
Beta Was this translation helpful? Give feedback.
Hey there, sorry for the long delay.
I thought about this a bit.
I'm sorry, but I don't think I'll add that to the documentation of the action.
One point is that I would recommend setting
.gitattributes
, then the next person comes and requests to change the advice to usingautocrlf
and so on.This is a general Git issue.
Imho you should always and in any Git repository that potentially ever is cloned on multiple operating systems (so basically each and every repository) add a
.gitattributes
file that pins*.bat
line endings to CRLF and shell script line endings to LF.Even if you only ever clone on Windows without WSL you could get in trouble if you for example use Cygwin.
I simply think …