fix(gitattributes): keep .bats files LF so 'bats tests/bash' works on a Windows checkout

The LF rule was scoped to 'bash/**', which does not match tests/bash/. With
core.autocrlf a Windows working copy got CRLF .bats files, and bats fails on
them - so the command the README documents would not run on the machine the
suite was written on without stripping \r first.

Adds tests/bash/** and *.bats to the same eol=lf rule and renormalises.
Verified by running 'bats tests/bash' with no sed preprocessing: 50/50.
This commit is contained in:
KellyMichels 2026-07-26 13:00:29 -05:00
parent 221cb34935
commit b92338bfb7

6
.gitattributes vendored
View File

@ -1,6 +1,12 @@
# Bash scripts must stay LF — CRLF breaks the shebang on Linux/macOS/WSL.
bash/** text eol=lf
# The bats suites are bash too, and they live outside bash/ — without this a
# Windows checkout gets CRLF and `bats tests/bash` fails there (including when
# run through WSL against the Windows working copy).
tests/bash/** text eol=lf
*.bats text eol=lf
# PowerShell/cmd are happiest with CRLF on Windows.
*.ps1 text eol=crlf
*.cmd text eol=crlf