Keep the line-ending policy off vendored node_modules - #26
Open
dhanjit wants to merge 1 commit into
Open
Conversation
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
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.
Completes the
dotdothalf of the line-ending sweep in dhanjit/brain#133.#25 landed
* text=auto eol=lfhere without anode_modules/exclusion, becauseorigin gitignores
node_modulesand tracks none of it — so at the time there wasnothing to exclude.
That is not the whole picture. The local pre-rewrite checkout still tracks 5625
node_modulesfiles, 32 of them with CRLF in the object store, and it shares nocommon ancestor with origin (dhanjit/brain#134). Whenever those two histories are
reconciled,
* text=auto eol=lfwould rewrite upstream's vendored bytes on the wayin.
-textmakes that impossible.The local
.gitattributesalready carries this stanza; this brings origin intoagreement with it, so a future merge holds no surprise.
Verification: byte-level
git cat-fileaudit of every blob onorigin/master(not
git ls-files --eol, which reports post-attribute interpretation and givesfalse cleans) — 41 text blobs, 0 CRLF. This change is defensive only and rewrites
nothing.
Refs dhanjit/brain#133