diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-27 22:19:58 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-27 22:19:58 +0200 |
| commit | d8357d864e323c2f7febce3b625478e0de21327b (patch) | |
| tree | 8d3c61983318c4ed2a2ff57c563afdb09d0183eb /.gitattributes | |
| parent | eccd465f8954bfd49c3f7d8f02446bc2aa5c4338 (diff) | |
| download | meshbay-d8357d864e323c2f7febce3b625478e0de21327b.tar.gz | |
chore: store text files with LF whatever the checkout's autocrlf
Several harnesses lift functions out of the SPA source as text by searching
for a literal "\n}\n". A Windows checkout with core.autocrlf=true turned that
into "\r\n}\r\n" and the searches failed silently. Pin LF for text files and
keep CRLF only where Windows scripts expect it (.bat, .cmd, .ps1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to '.gitattributes')
| -rw-r--r-- | .gitattributes | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..21fa5e9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Text files are stored and checked out with LF, regardless of the checkout +# platform's core.autocrlf. Several test harnesses lift functions out of the +# SPA source "as text" by searching for a literal "\n}\n" — CRLF from a +# Windows checkout (core.autocrlf=true) breaks that search silently, since +# the newline right before/after the brace is no longer a bare "\n". Forcing +# LF here fixes the environment to match what the tests already assume, +# rather than teaching every such search to tolerate "\r?\n". +* text=auto eol=lf + +# Windows-native scripts keep their conventional CRLF. +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf |