# The .gitattributes file defines how git handles different files with
# respect to line endings, diffs, merges, and encodings.

# To see all file types, use:
#     git ls-files | awk -F. 'NF>1 {print $NF}' | sort -u

# Test these settings with commands like:
#     git check-attr -a uv.lock

# docs: https://git-scm.com/docs/gitattributes

# Auto-detect if a file is a text file and set line endings to LF
* text=auto eol=lf

# Text files (use only diff values shown in git documentation)
*.bat text
*.bib text diff=bibtex
*.c text diff=cpp
*.cff text
*.css text diff=css
*.csv text
*.h text diff=cpp
*.html text diff=html
*.ini text
*.json text
*.md text diff=markdown
*.py text diff=python
*.pyi text diff=python
*.pyx text diff=python
*.rs text diff=rust
*.rst text
*.sh text diff=bash
*.svg text -diff -merge
*.toml text
*.txt text
*.yaml text
*.yml text
py.typed text

# Binary files
*.gif binary
*.h5 binary
*.hdf5 binary
*.ico binary
*.jpeg binary
*.jpg binary
*.npy binary
*.png binary

# Do not show diffs for generated files. During merge conflicts, use the
# file from the current branch as the default to prevent invalidation of
# the lockfile with merge conflict markers.
*.lock text -diff -merge
pylock*.toml text -diff -merge
