chore: normalize line endings to LF via .gitattributes#841
Merged
Conversation
Add `* text=auto eol=lf` so text files are checked in with LF regardless of the contributor's OS. Without this, Windows editors can save files with CRLF (and sometimes a UTF-8 BOM), which makes every line differ at the byte level on diff and trips GitHub's "Binary file not shown" heuristic — see #840 for an example where a ~30-line change was unreviewable for this reason. Existing LFS rules already carry `-text` and remain unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
miguel-heygen
approved these changes
May 14, 2026
|
Hello
…On Thu, May 14, 2026 at 18:45 James Russo ***@***.***> wrote:
Merged #841 <#841> into
main.
—
Reply to this email directly, view it on GitHub
<#841 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CAYSDINBXTIM7U3BDGF7UM342YA43AVCNFSM6AAAAACY6KNWW2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRVGU2DCMJUGQYDKMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
Summary
* text=auto eol=lfto.gitattributesso text files are checked in with LF regardless of the contributor's OS.Why
On #840, a TypeScript file landed in the PR saved as UTF-8-with-BOM + CRLF, while
mainhas it as UTF-8 + LF. Every line then differed at the byte level even though the actual code change was ~30 lines, which tripped GitHub's "Binary file not shown" diff heuristic and made the PR unreviewable..editorconfigalready declaresend_of_line = lfandcharset = utf-8, but that's a hint to editors — Git doesn't enforce it. Adding the rule at the.gitattributeslayer means Git itself normalizes on checkin, so this class of mistake can't reach a PR diff again.Existing LFS rules (
packages/producer/tests/.../*.mp4,.png) already carry-textand remain unaffected by the new top-level rule.Test plan
core.autocrlf=trueon Windows will have CRLF in their working tree but the repo will still store LF — confirm by inspecting a freshly-cloned.gitattributes-aware checkout (git ls-files --eol)🤖 Generated with Claude Code