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 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-09 09:46:56 +02:00
1 parent 1bd6e89ff5
commit 6cf47fd2ae
1 file changed
+4
+4
View File
@@ -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