bug(repo): a core.autocrlf=true checkout fails the fixture-parsing tests — there is no .gitattributes #1485
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit#1485
Loading…
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?
A checkout made with
core.autocrlf=true(the Git for Windows default) writes every tracked text file into the working tree with CRLF, and the tests that parse fixtures or compare snapshots fail on it. The repository has no.gitattributes, so nothing overrides the checkout-side setting.It is a working-tree fault, not an OS one: the same CRLF tree bind-mounted into a
golang:1.25Linux container fails the same way.Measured 2026-10-02 at
02fae6a(v0.63.1 post-cut), Go 1.27.1 on Windows 11, Git 2.55.0.windows.3:cmd/rtdoes not compile on Windows (internal/release/lock.gousessyscall.Flock), soTestHelpSnapshotis only reachable through the container. With an LF working tree, all 29 packages pass in that container.Because the index is already LF everywhere,
* text=auto eol=lfchanges no stored content.git add --renormalize .stages only the attributes file.Out of scope
The remaining native-Windows failures have Windows causes, not line-ending ones:
Flockbuild failureTestRepinFile_PreservesModeAndSkipsNoMatch,TestDiscoverUnreadableIsUngradeable,TestRunPostBumpHooks_theHookDoesNotReceiveTheGitCredential)register.ScanTree(TestScanTree)TestHeaderEmDashLocaleAndByteClassMutation)Acceptance criteria
.gitattributesforces LF in the working tree for text files:* text=auto eol=lf, plus explicittext eol=lffor the types the tests parse — DONE @ #1489 (55a12b9, reviewed as36aa902).core.autocrlf=trueshows zerow/crlfingit ls-files --eol— DONE @ #1489 (55a12b9, reviewed as36aa902). Freshcore.autocrlf=trueclone: 615i/lf w/lf, 7i/none w/none, 0w/crlf.git add --renormalize .stages nothing besides.gitattributes— DONE @ #1489 (55a12b9, reviewed as36aa902). Only.gitattributeswas staged before the commit; 0 paths on the fresh clone.TestHelpSnapshotin a Linux container on the mounted tree — DONE @ #1489 (55a12b9, reviewed as36aa902).internal/decideandinternal/gatesok natively,cmd/rtok ingolang:1.25; the reviewer reproduced all three on the tree merged with29b541b.changelog.dfragment tells contributors with an existing CRLF checkout how to rewrite it:git rm -r --cached -q . && git reset --hard, after committing or stashing local work — DONE @ #1489 (55a12b9, reviewed as36aa902).changelog.d/1485-gitattributes-eol.internal.md; recipe measured on a CRLF clone that pulled the change: all 615 filesw/lfafterwards, clean status.Anchor
Measured in throwaway clones: a baseline clone at HEAD and a fresh clone of a scratch commit that adds
.gitattributes, both made under the systemcore.autocrlf=true.claude referenced this issue2026-10-02 09:57:21 +02:00
#1489 landed as
55a12b9.git range-diffshows it is patch-identical (=) to the reviewed head36aa902.36aa902.success, with 28 contexts green. The two pendinggo-cicontexts are jobs gated topushonmain.DONE @ #1489.What actually shut this issue was a PR comment, not the PR body. The body says
Refs #1485, and its earlier keyword reference shows asneuteredin this timeline.The close came from comment 113711 on #1489. That comment has a plain-text closing keyword directly before this issue's number, and the timeline records it with
ref_action: closes. Forgejo honoured it at merge time: the close event is at 11:11:59, the same second as the PR'smerged_at.Comment 113708 has the same keyword inside inline code. It was recorded as
ref_action: none.ac-closure-checkgrades the PR body and the commit messages only, so a closing reference carried by a PR comment is outside what it sees. The outcome here is the intended one, because every AC is done. The mechanism is a gap in the gate, though, and worth a follow-up.go test ./...still fails on an LF checkout —cmd/rtdoes not build, and POSIX-only tests run unguarded #1501