devops: scope the -diff gitattribute to the minified highlight.js - #6323
Merged
Merged
Conversation
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.
.gitattributesmarkshighlight.js -diffto keep mdbook's 116KB single-line minified bundle out ofgit grepandgit diffoutput. Git matches a pattern with no/against the basename at any depth, so it also matchesgrammars/prql-lezer/src/highlight.js— 45 lines of hand-written source added in #6307. Every change to that file renders asBinary files … differ, locally and in GitHub's PR view, so its diff is invisible to review.Spelling out
web/book/theme/highlight.jskeeps the minified bundle suppressed and restores the source file's diff. The neighbouringpackage-lock.jsonentry is unanchored for the opposite reason — the repo has several of them and they should all be suppressed — so it stays as it is.Verification
git check-attron this branch, withweb/book/theme/highlight.jsstill carryingdiff: unsetand the lezer source no longer doing so:Replaying #6307's own commit shows what review missed at the time:
No regression test:
.gitattributesis git configuration with no code path to exercise, andgit check-attris the only assertion available.