# Store and check out every text file with LF endings, on every platform.
#
# Without this, git on Windows converts LF to CRLF in the working copy and back
# on commit. For most projects that is invisible. Here it is not: the corpus
# writer exists to put exact bytes on disk, because every recorded PHI offset is
# a character position into a file, and HL7 v2 terminates its segments with a
# bare carriage return. A newline conversion applied to a fixture or an expected
# output would shift those offsets and the cause would be nearly impossible to
# see in a diff.
#
# Generated corpora are gitignored, so they are not what this protects today.
# It protects against the day somebody commits one as a fixture.
* text=auto eol=lf

# Binary files, declared so git never attempts a line-ending or diff conversion.
*.png binary
*.jpg binary
*.jpeg binary
*.gz binary
*.zip binary
*.pdf binary
*.nii binary
*.dcm binary

# Vendored third-party documents, stored and checked out byte for byte. `-text`
# switches off every line-ending conversion that the rule above would otherwise
# apply.
#
# Today this changes nothing: all four shape files are published with LF
# endings, so `eol=lf` would be a no-op on them. It is here because
# `third_party/PROVENANCE.json` records a SHA-256 per file and NOTICE states
# that each is unmodified, and CC BY 4.0 asks a redistributor to indicate
# whether changes were made. If a future refresh ever brings CRLF from
# upstream, normalisation would rewrite those bytes and make that statement
# untrue -- quietly, because the file would still parse. This rule means the
# repository holds what the publisher serves, whatever the publisher serves.
#
# Stated plainly because the first version of this comment claimed the files
# *were* CRLF and that the rule was fixing an active problem. It was not: the
# measurement behind it used an empty grep pattern, which matches every line.
# The rule survived the correction; the reason given for it did not, and this
# project has already recorded once what an unexamined reason costs.
third_party/** -text
