mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5617] [MERGED] fix: check out LF working trees on Windows so pnpm check matches CI #6849
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6849
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5617
Author: @kolacheee
Created: 8/29/2026
Status: ✅ Merged
Merged: 8/29/2026
Merged by: @kolacheee
Base:
staging← Head:fix/5598-windows-lf-checkouts📝 Commits (1)
43b55edfix: check out LF working trees on Windows so pnpm check matches CI📊 Changes
3 files changed (+18 additions, -3 deletions)
View changed files
📝
.gitattributes(+8 -2)📝
.prettierrc(+2 -1)📝
CONTRIBUTING.md(+8 -0)📄 Description
Closes #5598.
Why
On every normal Windows clone,
pnpm check— the baseline validation command CONTRIBUTING and CLAUDE.md tell every contributor to run — failed at the Prettier step with ~1,300 "unformatted" files on a completely clean tree. Nothing was unformatted:.gitattributeshad* text=auto(stored LF, converted on checkout), Git for Windows defaults tocore.autocrlf=true(so working trees became CRLF), and Prettier'sendOfLinedefault islf(so every CRLF line was a violation). CI runs onubuntu-latestand never sees it — green in CI, red on every Windows machine, which trains Windows contributors to ignore the baseline gate. The same CRLF working tree also broke the regression lanes that match file contents against LF patterns or hash file bytes (android-local-auth,maintenance-lifecycle,release-tag-version,runtime-integrity,tracker-gallery-ui, and thepnpm-runnerlauncher lane).What changed
Three files, no code:
.gitattributes:* text=auto→* text=auto eol=lf. The in-treeeolattribute overridescore.autocrlf, so Windows working trees check out LF with no contributor configuration. Every tracked text file is already committed LF (git ls-files --eolshows zeroi/crlf/i/mixed), so this changes checkout behavior only — no content renormalization, no diff on any tracked file. The*.bat text eol=crlfexception is unchanged and still wins (last match). The two existing per-patheol=lflines are kept: they forcetextoutright rather than relying on auto-detection..prettierrc:"endOfLine": "lf"added explicitly. This is Prettier's existing default — zero behavior change — but the LF contract is now stated in both places instead of resting on an implicit default.CONTRIBUTING.md § Validation: a Windows note documenting the rule and the one-time refresh a pre-existing clone needs (git rm -r --cached . -q && git reset --hard, clean tree first). Fresh clones need nothing. Not underdocs/, so no docs-i18n mirror is triggered.win/launcher/build.ps1(the only.ps1) stays under the LF default — it is committed LF and PowerShell parses LF scripts fine.Verification (fresh simulated Windows clone)
On the machine that reproduces #5598 (Windows 11, Git for Windows), cloned this branch into a temp dir with
git clone -c core.autocrlf=true— exactly what a new Windows contributor gets:git ls-files --eol: 1,846 text filesw/lf, exactly the 3.batfilesw/crlf, 163 binary — the attribute overridesautocrlfas documented.git statusimmediately after clone: clean (no phantom-dirty files, the classic.gitattributespitfall — avoided here because nothing needed renormalizing).pnpm install, thenpnpm format:checkpasses, the six formerly CRLF-broken regression lanes pass, and fullpnpm checkpasses — results pasted in a comment below.eol=lfis a no-op there.Manual verification
git rm -r --cached . -q && git reset --hard, then confirmpnpm checkpasses on Windows with no real changesstart.bat/start-local.bat/ the installer batch file still run (they stay CRLF via the existing exception)Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.