# Normalise all text to LF on commit, independent of contributor OS.
# Pairs with .editorconfig and the mixed-line-ending pre-commit hook
# (belt-and-braces LF enforcement).
* text=auto eol=lf

# Explicit text types (source, documentation, tooling)
*.py        text eol=lf
*.pyi       text eol=lf
*.md        text eol=lf
*.json      text eol=lf
*.jsonc     text eol=lf
*.yaml      text eol=lf
*.yml       text eol=lf
*.toml      text eol=lf
*.cfg       text eol=lf
*.ini       text eol=lf
*.sh        text eol=lf
.gitignore      text eol=lf
.gitattributes  text eol=lf
.editorconfig   text eol=lf

# Test fixtures are bytes under test, not text to normalise. A graph fixture
# exists to prove a write left every untouched byte alone, so a checkout that
# rewrites its line endings makes the test assert something else - and it passes
# on Linux and fails on Windows, which is the worst of the three outcomes.
tests/fixtures/** -text

# Generated or vendored content that should not count as authored code in the
# language statistics on the repository page.
tests/fixtures/** linguist-vendored

# Binary assets: if we ever add images or PDFs, they belong in Git LFS (keeps
# history lean). `-text` exempts them from the `* text eol=lf` rule above so LFS
# and line-ending normalisation do not collide.
#
# These rules are inert until a matching file is added: with none tracked, git
# never invokes the lfs filter, so git-lfs is NOT required to clone, commit or
# test. It becomes required only for whoever first adds such a file - run
# `git lfs install` in your clone before committing one.
*.png       filter=lfs diff=lfs merge=lfs -text
*.jpg       filter=lfs diff=lfs merge=lfs -text
*.jpeg      filter=lfs diff=lfs merge=lfs -text
*.gif       filter=lfs diff=lfs merge=lfs -text
*.webp      filter=lfs diff=lfs merge=lfs -text
*.svg       filter=lfs diff=lfs merge=lfs -text
*.pdf       filter=lfs diff=lfs merge=lfs -text
