# Force LF on text files so Linux scripts run regardless of who committed them.
# Audit 2026-05-18 finding #8: scripts/mongo-backup.sh failed `bash -n` because
# CRLF mangled line continuations on Linux. This file makes git store LF for
# everything classified as text + keeps platform-native line endings out of the
# tree for shell, config, and language sources.

* text=auto eol=lf

# Explicit LF for things that BREAK with CRLF on Linux
*.sh            text eol=lf
*.bash          text eol=lf
*.py            text eol=lf
*.yml           text eol=lf
*.yaml          text eol=lf
*.json          text eol=lf
*.toml          text eol=lf
Dockerfile      text eol=lf
*.dockerfile    text eol=lf
.dockerignore   text eol=lf
.gitignore      text eol=lf
.gitattributes  text eol=lf
# Unified-diff context lines intentionally carry a single prefix space. Do not
# report that structural marker as outer-repository trailing whitespace; patch
# application still uses --whitespace=error for changed source lines.
*.patch         text eol=lf whitespace=-blank-at-eol

# Discovery captures may historically contain credentials. Keep them as text
# in the checkout, but never render removed values in commit or MR diffs.
docs/feature-discovery/*.log text eol=lf -diff

# Windows-native scripts keep CRLF — running them under cmd / PowerShell
# tolerates both but tools like Notepad expect CRLF.
*.ps1           text eol=crlf
*.cmd           text eol=crlf
*.bat           text eol=crlf

# Source code that's read on both sides: prefer LF (matches dotnet, java,
# rust, go, web conventions). VS / IDEs autoconvert on display when needed.
*.cs            text eol=lf
*.csproj        text eol=lf
*.sln           text eol=lf
*.md            text eol=lf
*.lua           text eol=lf

# Binary files — never normalize. Listing these explicitly prevents accidents
# when text=auto guesses wrong on small binary blobs.
*.png           binary
*.jpg           binary
*.jpeg          binary
*.gif           binary
*.ico           binary
*.pfx           binary
*.cer           binary
*.crt           binary
*.zip           binary
*.7z            binary
*.exe           binary
*.dll           binary
*.so            binary
*.dylib         binary
*.pak           binary
*.uasset        binary
*.uexp          binary
*.bin           binary
