-
Notifications
You must be signed in to change notification settings - Fork 151
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
Should autocrlf=false when cloning repositories? #1071
Comments
Could this be solved via a repo-specific .gitattributes file rather than hard coding a setting into the clone command? |
.gitattributes overrides user, system and global settings? Maybe a better solution then. Hard to tell 🤷 I really hate autocrlf, but it's a necessary evil on Windows unfortunately. Been years since I tried autocrlf=false on Windows, so maybe I should try again. I see the following threads have advocates for both sides: https://stackoverflow.com/questions/2825428/why-should-i-use-core-autocrlf-true-in-git#2825829 Why oh why does Windows have to work so different from all other operating systems..? :( |
So currently we don't set any special autocrlf settings in Generally speaking, I think if |
What's wrong
I found out this when using the
sly
package on Windows for the first time. It has a multi-line format, which broke becauseautocrlf=true
, which is the recommended default on Windows. But (newer) Windows supports only LF too, and when we're not cloning a repo in order to work with cross OS repos, a better default might beautocrlf=false
, i.e. as the repo author intended.This can be done on the clone command by saying
--config autocrlf=false
, which setsautocrlf=false
in.git/config
in the cloned repository.Directions to reproduce
Clone
sly
on Windows usingautocrlf=true
and runM-x sly
.Version information
The text was updated successfully, but these errors were encountered: