Skip to content

chore: pin text files to LF so a Windows save is not a 259-line diff - #201

Merged
imran-siddique merged 1 commit into
mainfrom
chore/gitattributes-lf
Aug 23, 2026
Merged

imran-siddique merged 1 commit into
mainfrom
chore/gitattributes-lf

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Why

This repository has no .gitattributes, so line endings are whatever each contributor's editor produces.

#184 landed a one-line CHANGELOG entry as +265-264. Measured on the diff bytes: all 259 removed lines end in CR, none of the 265 added lines do, and there are exactly two genuinely new lines and zero genuinely deleted. The rest was a CRLF-to-LF conversion of a file nobody had edited, rewriting its blame.

That is the third occurrence of the class. awesome-ai-governance #57 and #65 hit it before, and #66 fixed it there the same way.

What

Pins *.md, *.json, *.py, *.yml and *.yaml to eol=lf, and normalises the ten text files still stored with CRLF:

docs/schema.md
schema/trace-claim.json
schema/trace-revocation-bundle.json
schema/trace-revocation.json
src/agentrust_trace/__init__.py
src/agentrust_trace/models.py
src/agentrust_trace/schema/trace-v0.1.json
tests/test_models.py
tests/test_revocation_schema.py
tests/test_validate.py

The normalisation is line endings only. git diff --cached --ignore-all-space --numstat reports zero changed content on every one of them.

Why now rather than later

docs/schema.md, schema/trace-claim.json and src/agentrust_trace/models.py are three of the six files #199 is currently touching. Landing this first keeps the churn in one obviously mechanical commit instead of spreading it across whoever edits those files next.

The diffstat is large and every line of it is a carriage return.

trace-spec had no .gitattributes, so line endings were whatever each
contributor's editor produced. #184 landed a one-line CHANGELOG entry as
+265-264, with all 259 removed lines ending in CR and none of the added ones,
rewriting the blame on a file nobody had edited. The same class cost two
listing PRs in awesome-ai-governance before it.

Pins *.md, *.json, *.py, *.yml and *.yaml to LF and normalises the ten text
files still stored with CRLF. The normalisation is line endings only:
git diff --cached --ignore-all-space reports no content change on any of them.

Doing it here rather than in a contributor's PR keeps the blame churn in one
commit that is obviously mechanical, instead of spread across whoever next
edits docs/schema.md, schema/trace-claim.json or src/agentrust_trace/models.py.
Those three are exactly the files #199 is currently touching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@imran-siddique
imran-siddique requested a review from a team as a code owner August 23, 2026 04:39
@imran-siddique
imran-siddique merged commit c429dfc into main Aug 23, 2026
6 checks passed
@imran-siddique
imran-siddique deleted the chore/gitattributes-lf branch August 23, 2026 06:34
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