From 6cf47fd2ae5177ff71f1df40671e26c12d1601e3 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Sep 2026 09:46:56 +0200 Subject: [PATCH] Add .gitattributes to force LF checkout on all platforms The worktree is shared over SMB with a Windows client whose system gitconfig has core.autocrlf=true. It checked build.sh back out with CRLF, which git then reported as a permanent modification, and "discard changes" rewrote CRLF again - an unbreakable loop from the Windows side. A CRLF shell script is also not executable on Linux: the interpreter becomes "/bin/bash\r". "* text=auto eol=lf" makes the checkout LF everywhere. This complements the repo-local core.autocrlf=false and core.filemode=false already set in .git - unlike those, it travels with a fresh clone. Verified: no file in the index has CRLF, so this does not renormalize anything existing (git ls-files --eol reports i/lf w/lf throughout). Co-Authored-By: Claude Opus 5 --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..f3416702 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# The worktree lives on an SMB share that a Windows client also writes to. +# Without this it writes CRLF back, which makes build.sh unexecutable on Linux +# (the interpreter becomes "/bin/bash\r"). +* text=auto eol=lf