From 7f568fd0c9bc2d2db7de2185eba8a4458b107637 Mon Sep 17 00:00:00 2001 From: loki5512344 Date: Tue, 15 Sep 2026 16:18:23 +0200 Subject: [PATCH] ci: set core.autocrlf=false before checkout; windows images ship autocrlf=true in system gitconfig, which rewrote LF fixtures to CRLF and broke byte-span assertions --- .github/workflows/ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5575067..f583572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Keep LF line endings + run: git config --global core.autocrlf false - uses: actions/checkout@v4 - with: - core.autocrlf: input - run: cargo fmt --check - run: cargo clippy --all-targets -- -D warnings @@ -25,10 +25,11 @@ jobs: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - # core.autocrlf=input keeps the working tree LF on every OS: the - # span/byte-offset tests and the git rename assertions compare exact - # fixture bytes. + # Windows images ship core.autocrlf=true in the *system* gitconfig: + # without this override the checkout rewrites LF fixtures to CRLF and + # the span/byte-offset tests compare the wrong bytes. Global config + # outranks system, so it neutralizes the image default before checkout. + - name: Keep LF line endings + run: git config --global core.autocrlf false - uses: actions/checkout@v4 - with: - core.autocrlf: input - run: cargo test --locked --no-fail-fast