You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out this when using the sly package on Windows for the first time. It has a multi-line format, which broke because autocrlf=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 be autocrlf=false, i.e. as the repo author intended.
This can be done on the clone command by saying --config autocrlf=false, which sets autocrlf=false in .git/config in the cloned repository.
Directions to reproduce
Clone sly on Windows using autocrlf=true and run M-x sly.
Version information
Emacs version: 28.2
Operating system: Windows 11
The text was updated successfully, but these errors were encountered:
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.
So currently we don't set any special autocrlf settings in straight.el, because the idea is that probably you want the same settings to be used for straight.el as when you are otherwise cloning repos. Don't you run into similar issues elsewhere on your system if the autocrlf setting is not applied properly?
Generally speaking, I think if git clone fails due to configuration, it is out of scope for straight.el to try and patch the issue.
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: