summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-08 15:10:35 +0700
committerhathach <[email protected]>2026-06-08 15:10:35 +0700
commit6586d94af07c96b6842d31fd6b06288d78e26864 (patch)
tree6a61d024415d7c27c9a3657605b1bcee6884c727
parentd2e7bbb0855a3ff3d6393c7d7edd755cfd3362df (diff)
gitattributes: keep shell scripts LF under core.autocrlf
With core.autocrlf=true, *.sh files were checked out / restored with CRLF line endings, which breaks bash ($'\r': command not found; set: pipefail: invalid option). Pin *.sh to eol=lf so shell scripts stay LF in the working tree regardless of autocrlf. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
-rw-r--r--.gitattributes3
1 files changed, 3 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 140ae8929..723f48277 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -19,6 +19,9 @@
Makefile text
+# Shell scripts must stay LF even when core.autocrlf=true (CRLF breaks bash)
+*.sh text eol=lf
+
# Windows-only Visual Studio things
*.sln text eol=crlf