-
Notifications
You must be signed in to change notification settings - Fork 560
Fix .gitattributes to normalize EOL to LF. Normalize existing content. #650
Conversation
eed56ec
to
4ca97ff
Compare
4ca97ff
to
23b8761
Compare
It seems to depend on where I run the But if I run it from Windows natively, it writes in native Windows line format, and then tries to commit like that even though I have |
@@ -1 +1 @@ | |||
* -crlf | |||
* eolf=lf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find eolf from https://git-scm.com/docs/gitattributes. The closest is eol=lf. But I am not familiar with gitattributes ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gah, thanks. I will have to retest now that I've fixed my typos.
also, fwiw, I'm changing this branch around a lot right now just trying to find a combination that maybe does the right thing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
FWIW I think #663 will fix the line encodings issue. |
Yeah #663 is good. It still has the same problem if you do some actions inside the docker container on windows and then do the git actions inside Windows natively... but I guess Windows devs are going to just have to be a bit careful... I spent many hours on trying to get a Windows config that works consistently and couldn't seem to get it to do the right thing. Thanks for #663. Closing this out since it's basically the bulk of #663. |
@colemickens no worries. the bad news is folks have to do a bit of manual config on their end, but once they do, git should do the "write" (get it? sorry). |
This seems to do the right thing, based on reading and testing (natively from Linux, natively from macOS, natively from Windows [using Git Bash]. I'm not sure about from Docker in Windows yet, hopefully someone can try for me; I don't have a way of testing that).
When I first pulled this branch on Windows and ran
glide install
, it showed files ingit status
as being modified, butgit status
showed no changes after executinggit add -A .
. Further invocations ofglide install
hadgit status
consistently showing no changes (good!).TODO: Can someone who uses the docker container on Windows, pull this branch, run
glide install
and thengit add -A .
and then check to see ifgit status
shows files as modified. thanks.This change is