Skip to content

fix(gitattributes): every tracked text file is LF on every checkout (CH-6) - #311

Merged
jothimani-rajendran merged 2 commits into
mainfrom
ch-6-gitattributes-catchall
Oct 19, 2026
Merged

jothimani-rajendran merged 2 commits into
mainfrom
ch-6-gitattributes-catchall

Conversation

@jothimani-rajendran

@jothimani-rajendran jothimani-rajendran commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What

.gitattributes gains * text=auto eol=lf above the extension rules, plus explicit binary lines for png, gif, mp4, ico, jpg, jpeg, woff, woff2, pdf and .coverage (tracked today; CH-7 removes it, then the line is dead and can go). New tests/test_gitattributes.py.

Why

Tracked text files matching no rule (LICENSE, pyproject.toml, docs/assets/promo/, acceptance/, ...) check out CRLF on Windows with core.autocrlf=true, so any tool hashing a checkout (catalog framework-pin verify) sees a diff from the pinned commit. The index holds no CRLF blob, so no blob changes.

Measured

  • git add --renormalize . && git status --porcelain: only M .gitattributes (no blob changes).
  • git ls-files --eol: 1504 i/lf entries, all 1504 with eol=lf; 38 i/-text.
  • tests/test_gitattributes.py: 3 passed locally. Full suite and the windows-paths job: unmeasured, CI decides.

Test

Every i/lf file has eol: lf; every i/-text file has text unset/unspecified; no i/crlf or i/mixed in the index.

…CH-6)

72 tracked text files matched no eol rule and came out CRLF under
core.autocrlf=true. Add a `* text=auto eol=lf` catch-all, name the known
binaries, and pin both with tests/test_gitattributes.py.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review October 19, 2026 21:12
@jothimani-rajendran
jothimani-rajendran merged commit 590ac57 into main Oct 19, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant