Skip to content

Keep the line-ending policy off vendored node_modules - #26

Open
dhanjit wants to merge 1 commit into
masterfrom
dotdot-gitattributes-133
Open

Keep the line-ending policy off vendored node_modules#26
dhanjit wants to merge 1 commit into
masterfrom
dotdot-gitattributes-133

Conversation

@dhanjit

@dhanjit dhanjit commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Completes the dotdot half of the line-ending sweep in dhanjit/brain#133.

#25 landed * text=auto eol=lf here without a node_modules/ exclusion, because
origin gitignores node_modules and tracks none of it — so at the time there was
nothing to exclude.

That is not the whole picture. The local pre-rewrite checkout still tracks 5625
node_modules files, 32 of them with CRLF in the object store, and it shares no
common ancestor
with origin (dhanjit/brain#134). Whenever those two histories are
reconciled, * text=auto eol=lf would rewrite upstream's vendored bytes on the way
in. -text makes that impossible.

The local .gitattributes already carries this stanza; this brings origin into
agreement with it, so a future merge holds no surprise.

Verification: byte-level git cat-file audit of every blob on origin/master
(not git ls-files --eol, which reports post-attribute interpretation and gives
false cleans) — 41 text blobs, 0 CRLF. This change is defensive only and rewrites
nothing.

Refs dhanjit/brain#133

The policy landed in #25 without an exclusion, because origin already
gitignores node_modules and tracks none of it. The local pre-rewrite
history does track 5625 of those files, 32 of them CRLF, and shares no
common ancestor with origin (dhanjit/brain#134). Whenever those two
histories are reconciled, "* text=auto eol=lf" would rewrite upstream's
bytes on the way in. -text makes that impossible.

Refs dhanjit/brain#133
@dhanjit dhanjit mentioned this pull request Sep 10, 2026
6 tasks
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