# Line endings, pinned where getting them wrong breaks something.
#
# Git on Windows defaults to core.autocrlf=true, which rewrites LF to CRLF on
# checkout. For most files that is harmless. For these it is not:

# Shell scripts run on Linux. A CRLF checkout that is copied to a server
# fails with `bash: \r: command not found`, which tells you almost nothing
# about what is wrong.
*.sh            text eol=lf
install.sh      text eol=lf

# Patch files must survive byte for byte: `patch` and `git apply` both care,
# and tools/refresh-patches.sh --check compares them against freshly
# generated LF output.
*.patch         -text

# Container and CI inputs are read by Linux tooling.
Dockerfile      text eol=lf
*.yml           text eol=lf
.env.example    text eol=lf
docker/nginx/*  text eol=lf

# PHP and JS are served, not executed by a shell, so either ending works —
# but keeping them LF means a diff between a Windows and a Linux checkout is
# about the code rather than about the line endings.
*.php           text eol=lf
*.js            text eol=lf
*.css           text eol=lf
*.md            text eol=lf
