Skip to content

chore: pin line endings before this repo drifts the way minecraft did - #41

Open
MorningLightMountain713 wants to merge 1 commit into
feat/log-cursorfrom
chore/normalise-line-endings
Open

MorningLightMountain713 wants to merge 1 commit into
feat/log-cursorfrom
chore/normalise-line-endings

Conversation

@MorningLightMountain713

Copy link
Copy Markdown
Collaborator

A .gitattributes so this repo cannot drift the way minecraft-server-website did. Nothing to convert and no code changes.

Stacked on #40 — it must merge first.

Why, when nothing is broken here

All 130 text files in this repo are already LF. That is luck, not a rule: there is no .gitattributes, so the repo depends on every contributor having core.autocrlf set the way it happens to need.

minecraft-server-website is the same codebase without that luck. Its root commit went in from a Windows machine and 36 of its 118 files have been CRLF ever since — including the ServerTerminal.jsx that is this repo's twin, and the file both these PRs change.

What that costs over there: writing that file back as LF while making the same 78-line change produced a 1,609-line diff which buried the real change. One editor with different settings, or one formatter run, does the same thing here on the day someone commits from Windows.

What this does

.gitattributes is fluxos-frontend's, verbatim — the same web-project template already in use across the org, 207 lines.

* text=auto is the line that does the work: text is normalised to LF in the repository whatever a contributor's machine writes locally. The eol= overrides go both ways — .bat, .cmd and .ps1 pinned to CRLF because Windows needs it, .sh, .husky/* and package.json pinned to LF because a shell script or a git hook with CRLF does not execute. 59 binary rules stop git touching line endings inside images and fonts.

git add --renormalize . was run and changed nothing, which is the point: this is a guard, not a repair.

🤖 Generated with Claude Code

Nothing to convert - all 130 text files here are already LF. That is luck, not a
rule: there is no .gitattributes, so the repo depends on every contributor
having core.autocrlf set the way this one happens to need it.

minecraft-server-website is the same codebase without that luck. Its root commit
went in from a Windows machine and 36 of its 118 files have been CRLF ever
since, including the ServerTerminal.jsx that is this repo's twin.

.gitattributes is fluxos-frontend's, verbatim - the same web-project template
already in use across the org. `* text=auto` normalises text to LF in the
repository whatever a contributor's machine writes locally, and the eol=
overrides go both ways: .bat, .cmd and .ps1 pinned to CRLF because Windows needs
it, .sh, .husky/* and package.json pinned to LF because a shell script or a hook
with CRLF does not execute.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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