Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitattributes: Mark minified javascript as binary to filter greps #1479

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

joshtriplett
Copy link
Member

When doing a git grep (of rustc-dev-guide or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the minified
javascript, the resulting long single lines can cause a text pager or
editor to slow down and distract from more useful matches.

Minified javascript isn't formatted for human consumption, by
definition, so mark it as binary, which causes git grep to instead just
state that it matches without printing the matching "line".

When doing a git grep (of rustc-dev-guide or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the minified
javascript, the resulting long single lines can cause a text pager or
editor to slow down and distract from more useful matches.

Minified javascript isn't formatted for human consumption, by
definition, so mark it as binary, which causes git grep to instead just
state that it matches without printing the matching "line".
@tshepang tshepang merged commit 9a86c04 into rust-lang:master Oct 7, 2022
@joshtriplett joshtriplett deleted the 'min'-is-relative branch October 7, 2022 16:36
@joshtriplett
Copy link
Member Author

@tshepang Thanks for the quick review and merge!

Would you mind looking at rust-lang/rust#102788 to get this into rust-lang/rust, to fix git grep there?

@tshepang
Copy link
Member

tshepang commented Oct 7, 2022

I don't think I got privs to r+ anything in rust-lang/rust... would have to check docs how, but maybe @JohnTitor has done it

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.

2 participants