Skip to content

Pin line endings to LF - #1

Merged
Ericran merged 1 commit into
mainfrom
line-endings
Sep 4, 2026
Merged

Pin line endings to LF#1
Ericran merged 1 commit into
mainfrom
line-endings

Conversation

@Ericran

@Ericran Ericran commented Sep 4, 2026

Copy link
Copy Markdown
Owner

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 override core.autocrlf. Git for Windows sets it to true in its system gitconfig, so nothing in the repo guaranteed the behaviour.

The plugin-cs2-addons sibling did not override it and checked out CRLF, which made every cross-repo diff between the two plugins read as 100% changed unless you passed diff --strip-trailing-cr. Since the two share a substantial amount of code, that made side-by-side review impractical.

.gitattributes states 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 binary guard — 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 .gitattributes itself.

The matching change is booskibro/plugin-cs2-addons#4, which also has to normalize its worktree and picks up a build.ps1 to 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

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>
@Ericran
Ericran merged commit d3d3cfa into main Sep 4, 2026
1 check 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