From 218f5e2dd660ce1b8d85e76fb14c84ce66aaa82f Mon Sep 17 00:00:00 2001 From: Ajay Ghanwat Date: Tue, 4 Aug 2026 20:17:39 +0530 Subject: [PATCH] chore: add .gitattributes enforcing LF The repo had none, and core.autocrlf=true is the usual Git-on-Windows setting, so a clone, checkout, or stash pop silently rewrites every text file to CRLF. That fails format:check against prettier's endOfLine: lf - it already turned the gate red once mid-branch, after a stash round-trip reintroduced CRLF into files that had been committed clean. Verified: no tracked file currently carries a CR byte at HEAD. Co-Authored-By: Claude Opus 5 --- .gitattributes | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..4b30a400 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# Enforce LF in the working tree regardless of a contributor's core.autocrlf. +# Without this, Git on Windows smudges every text file to CRLF on clone, stash +# pop, or checkout, which fails `bun run format:check` (prettier endOfLine: lf). +* text=auto eol=lf + +# Binary assets Git must not touch. +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.webp binary +*.ico binary +*.pdf binary +*.woff binary +*.woff2 binary +*.db binary