# Auto detect text files and perform LF normalization
* text=auto

# Shell scripts keep LF in the working tree as well as in the index. Left to
# `text=auto`, a Windows clone writes them with carriage returns, and the
# documented Linux path then dies inside the container in under a second: the
# shebang reads as the interpreter `bash\r`, which does not exist. Nothing about
# that failure names line endings, and the same clone builds and tests fine
# everywhere else, so it reads as a broken image rather than a broken checkout.
#
# A clone checked out before this rule keeps its carriage returns, because the
# blob is unchanged and git has no reason to rewrite the file. The one-line
# repair is in native/GameCult.Mesh.Quic.Native/README.md, beside the container
# path it unblocks.
*.sh text eol=lf

# The committed CultMesh QUIC native binaries (cut 6, packaging) ride the
# deploy `git archive` as raw bytes. `* text=auto` already autodetects them as
# binary by content, but that autodetection is a heuristic; say so explicitly
# so no future text-processing rule (a diff driver, an export filter) can
# apply text conversion and poison the committed digests in SHA256SUMS.
packages/cultmesh-ts/native/**/*.dll binary
packages/cultmesh-ts/native/**/*.so binary
packages/cultmesh-ts/native/**/*.so.* binary

# The digest list and manifest beside them keep LF on every checkout. Left to
# `text=auto`, a Windows clone writes them with carriage returns, and the
# documented `sha256sum -c SHA256SUMS` then fails on every line (each filename
# ends in `\r`) while CI, checking out on Linux, stays green.
packages/cultmesh-ts/native/SHA256SUMS text eol=lf
packages/cultmesh-ts/native/MANIFEST.txt text eol=lf

# CultMath source keeps CRLF in the working tree on every checkout. The release
# gate compares the CultMath.dll it builds with the one org.gamecult.cultmath
# tracks, byte for byte, and the bytes follow the checkout's line endings: the
# pdb's document checksums feed the DLL's pdb id, timestamp and MVID. The
# tracked DLL was built from CRLF source, so CRLF here keeps it valid, and an
# LF-configured or Linux clone builds the same bytes as a Windows one. The index
# stays LF; only the checkout changes.
packages/cultmath/src/** text eol=crlf

# Stores the Python typed-leaf tests write for the C# reference to open.
tests/vectors/**/*.cc binary
