about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2022-10-07 17:27:49 +0100
committerTshepang Mbambo <tshepang@gmail.com>2022-10-07 18:34:51 +0200
commit615f414a1b6dfd8f9b3d5bcdb5a2581bb9c0f206 (patch)
tree4c0ca59a74ba64a532d087d9903550b4a6b69284 /src/doc/rustc-dev-guide
parentd144eef1c9a78340e1cb430b5cc47ffb716ccd27 (diff)
downloadrust-615f414a1b6dfd8f9b3d5bcdb5a2581bb9c0f206.tar.gz
rust-615f414a1b6dfd8f9b3d5bcdb5a2581bb9c0f206.zip
.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".
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/.gitattributes3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/.gitattributes b/src/doc/rustc-dev-guide/.gitattributes
index fd394480f15..ba72ee95922 100644
--- a/src/doc/rustc-dev-guide/.gitattributes
+++ b/src/doc/rustc-dev-guide/.gitattributes
@@ -1,6 +1,9 @@
 # Set the default behavior, in case people don't have core.autocrlf set.
 * text=auto eol=lf
 
+# git grep shouldn't match entries in huge minified javascript
+*.min.js binary
+
 # Older git versions try to fix line endings on images, this prevents it.
 *.png binary
 *.jpg binary