Skip to content

Commit 9a86c04

Browse files
joshtripletttshepang
authored andcommitted
.gitattributes: Mark minified javascript as binary to filter greps
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".
1 parent 0932ad6 commit 9a86c04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Set the default behavior, in case people don't have core.autocrlf set.
22
* text=auto eol=lf
33

4+
# git grep shouldn't match entries in huge minified javascript
5+
*.min.js binary
6+
47
# Older git versions try to fix line endings on images, this prevents it.
58
*.png binary
69
*.jpg binary

0 commit comments

Comments
 (0)