Pin line endings to LF - #1
Merged
Merged
Conversation
This repo already stored LF in git and checked out LF, but nothing said so — Git for Windows sets core.autocrlf=true system-wide, so that held only because this clone happened to override it. The plugin-cs2-addons sibling did not, and checked out CRLF, which made every cross-repo diff read as 100% changed. .gitattributes states the intent in the repo rather than in per-clone config, matching what CI already builds on (ubuntu-latest). `git add --renormalize .` stages nothing else: no tracked file changes content. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repo already stored LF in git — all 79 tracked files were
i/lf— and checked out LF too, but only because this particular clone happened to overridecore.autocrlf. Git for Windows sets it totruein its system gitconfig, so nothing in the repo guaranteed the behaviour.The
plugin-cs2-addonssibling did not override it and checked out CRLF, which made every cross-repo diff between the two plugins read as 100% changed unless you passeddiff --strip-trailing-cr. Since the two share a substantial amount of code, that made side-by-side review impractical..gitattributesstates the intent in the repo rather than in per-clone config, so it survives a fresh clone on any machine, and matches what CI already builds on (ubuntu-latest). It also carries a*.wasm binaryguard — build outputs are gitignored today, but one committed by accident should not have its bytes rewritten.No tracked file changes content.
git add --renormalize .stages nothing but.gitattributesitself.The matching change is booskibro/plugin-cs2-addons#4, which also has to normalize its worktree and picks up a
build.ps1to match this repo's.Verification
Files the two plugins share verbatim now diff to zero with plain
diff, no--strip-trailing-cr:src/http.rs,src/handlers/restart.rs,frontend/src/lib/naming.ts,frontend/src/lib/http-error.ts,frontend/src/components/SnapshotsModal.vue,frontend/src/components/AuditModal.vue,frontend/src/__tests__/http-error.test.ts.🤖 Generated with Claude Code