bazelbuild / bazelbuild/bazel-skylib

tests fail on windows after git clone with autocrlf=true

Open
#526 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
444
Forks
202
PR merge metrics
No merged PRs in 30d

Description

After git clone of this repo with autocrlf=true on windows, 31 tests fail. These are diff tests that are comparing files output by tooling that always generates LF, with repo files that are sometimes CRLF and sometimes LF.

I believe the solution is for all windows users to clone with autocrlf=input, or to check in a .gitattributes file so everyone gets LF files:

.gitattributes:
```
# The behavior of core.autocrlf=input is to force conversion to LF on addition
# into the repository and not to perform any conversion on checkout; that is,
# to always use LF endings regardless of the user's settings. This is set in
# .gitattributes as '* eol=lf'
* eol=lf
```

Contributor guide

Open the contributing guide

Research direction

Start by cloning the repository on Windows with autocrlf=true and running the tests that expose the 31 diff failures. Review the proposed .gitattributes entry for consistent LF checkout behavior, then verify that the affected diff tests pass without changing their expected outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.