fix(edit-docs): check the generated doc trees out with LF

edit-docs now writes docs/, the help HTML and the demo with LF, but only
part of those trees carried an eol attribute. The rest was left to
core.autocrlf, which checks them out with CRLF on Windows, so every
export flipped them back and forth: 214 text files, among them the
JavaScript, SVG and JSX attachments and the whole demo tree.

The flip is invisible in a diff and still shows up in git status, because
the index caches each file's size and reports a size mismatch as modified
without comparing content, then never refreshes the cached size on its
own. Staging is what clears it.

Cover the three generated trees with text=auto eol=lf, which also
replaces six demo/** rules that matched nothing, the demo living under
apps/edit-docs/. No committed blob in those trees holds CRLF, so nothing
is restaged; text=auto keeps the images and other binary attachments out
of the conversion, verified by checking a PNG, an SVG and a DAT
attachment out and comparing them against their blobs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Elian Doran
2026-09-12 11:08:02 +02:00
co-authored by Claude Opus 5
parent 3b099726d1
commit 340ececadc
+6 -10
View File
@@ -4,21 +4,17 @@ package-lock.json linguist-generated=true
apps/server/src/assets/doc_notes/en/User[[:space:]]Guide/** linguist-generated
# Ignore from GitHub language stats.
apps/server/src/assets/doc_notes/en/User[[:space:]]Guide/**/*.html eol=lf
apps/server/src/assets/doc_notes/** linguist-vendored=true
apps/edit-docs/demo/** linguist-vendored=true
docs/** linguist-vendored=true
# Normalize line endings.
# Normalize line endings. edit-docs writes the three generated trees with LF, so they have to
# check out with LF too — otherwise every export leaves them looking modified on Windows.
# `text=auto` keeps the images and other binary attachments they contain out of the conversion.
patches/** eol=lf
docs/**/*.md eol=lf
docs/**/*.json eol=lf
demo/**/*.html eol=lf
demo/**/*.json eol=lf
demo/**/*.svg eol=lf
demo/**/*.txt eol=lf
demo/**/*.js eol=lf
demo/**/*.css eol=lf
docs/** text=auto eol=lf
apps/server/src/assets/doc_notes/** text=auto eol=lf
apps/edit-docs/demo/** text=auto eol=lf
*.sh eol=lf
# Always diff TypeScript sources as text so a stray control byte (e.g. a NUL in