From dfd28c17644a773cdbe64675507be4096d6691c9 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 22 Sep 2021 12:51:58 -0700 Subject: [PATCH] Mark large benchmark data files as binary to filter greps When doing a git grep (of rust-analyzer or of rust-lang/rust with --recurse-submodules), if the grep happens to match within the large benchmark data files, the resulting long single lines can cause a text pager or editor to slow down and distract from more useful matches. These test data files aren't formatted for human consumption, so mark them as binary, which causes git grep to instead just state that they match without printing the matching "line". --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 7c2f752d69..3b3d2d0d65 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,6 @@ * text=auto eol=lf +# git grep shouldn't match entries in this benchmark data +bench_data/** binary crates/syntax/test_data/** -text eof=LF # Older git versions try to fix line endings on images, this prevents it. *.png binary