# Default for every file: LF in the repository and in every working
# tree. `text=auto` keeps git's own text-or-binary detection; `eol=lf`
# checks text files out with LF on every platform, whatever
# `core.autocrlf` says locally. Batch files are the one exception,
# because cmd.exe mis-parses an LF-only one. Takes effect from the next
# `git add`; a one-off `git add --renormalize .` covers files already
# in the index. The pins below predate this default and stay as the
# record of what each one protects.
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf

# Force LF line endings for files parsed by both Raku
# (Build.rakumod) and POSIX shell scripts (scripts/ci/fetch-notcurses-
# source.sh). Windows checkouts with core.autocrlf=true would otherwise
# convert these to CRLF, leaving a trailing \r on every line and
# tripping the 40-char SHA hex check in fetch-notcurses-source.sh.

NOTCURSES_FORK    text eol=lf
BINARY_TAG        text eol=lf

# Shell scripts always LF (bash and msys2 bash both refuse to source
# CRLF-tainted scripts cleanly on some platforms).
*.sh              text eol=lf

# CMake and YAML — also parsed by tools sensitive to trailing whitespace.
*.yml             text eol=lf
*.yaml            text eol=lf

# resources/licenses/*.txt is copied verbatim into every prebuilt
# pack, and resources/third-party.json is read by jq inside MSYS2 on
# the Windows lanes. Pinning both to LF keeps the LICENSES/ bytes in
# a Windows .zip identical to the ones in a Linux .tar.gz, so the
# same licence text cannot hash two different ways depending on which
# runner produced the archive. resources/checksums.txt is also .txt
# and is parsed line-by-line by Build.rakumod.
*.txt             text eol=lf
*.json            text eol=lf

# src/notcurses_native_shim.c is SHA-256'd by every build lane and the digest
# ships inside the archive as libnotcurses_native_shim.<ext>.srchash, which
# Build.rakumod then compares against a hash of this same file in the user's
# checkout. GitHub's Windows runners default to core.autocrlf=true, so without
# this the Windows lane hashed CRLF bytes and recorded a digest no LF checkout
# can reproduce — the shim is judged stale on every single install, and a
# prebuilt-only Windows install cannot recompile it (the archive carries no
# libnotcurses-core.dll.a), so it silently loses the shim and Selkie's
# ViewportedCardList falls back to the slower Raku per-cell merge. The macOS
# and Linux lanes were unaffected only because their runners check out LF.
*.c               text eol=lf
*.h               text eol=lf

# Never converted, never diffed as text.
*.png    binary
*.jpg    binary
*.jpeg   binary
*.gif    binary
*.bmp    binary
*.webp   binary
*.xcf    binary
*.ico    binary
*.gz     binary
*.tgz    binary
*.zip    binary
*.tar    binary
*.onnx   binary
*.db     binary
*.sqlite binary
*.dll    binary
*.so     binary
*.dylib  binary
*.a      binary
*.lib    binary
*.exe    binary
*.mov    binary
*.mp4    binary
*.wav    binary
*.ttf    binary
*.otf    binary
*.woff   binary
*.woff2  binary
*.pdf    binary
