From d8357d864e323c2f7febce3b625478e0de21327b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 27 Sep 2026 22:19:58 +0200 Subject: 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 --- .gitattributes | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitattributes 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 -- cgit v1.2.3