Skip to content
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

Update Windows Guides on CRLF vs. LF Bugs #744

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ContributingOnWindows.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,20 @@ For full windows support, it'd be nice to have `npm` as a variable that switches
npm = which npm
```

You also don't have to use Cargo make. VS Code tasks also help me circumvent this kind of stuff. But I try to avoid calling npm directly if possible, since everybody should ideally be using the same build tools.
You also don't have to use Cargo make. VS Code tasks also help me circumvent this kind of stuff. But I try to avoid calling npm directly if possible, since everybody should ideally be using the same build tools.

## CRLF vs. LF
### Random Whitespacing in Generation (core.autocrlf)
Git, in its attempts to be helpful, created a bunch of extra whitespaces in converting CRLF to LF. Which led to differences from the CI on Windows.

So these commands help get rid of that:

```bash
# Disable Git's CRLF to LF conversion:
git config --global core.autocrlf false
# Reset cached files to remove associations
git rm --cached -r .
git reset --hard
```

You can re-enable the `core.autocrlf` option afterwards if you'd like: `git config --global core.autocrlf true`. Just don't reset the cache.
Loading