News for hackers. Stuff that matters.
Re:Ripgrep is faster (2016) by bluetech on Saturday September 08, 2018 @06:28PM (#17943147)
One reason I still use git grep is this: I have some minified .js files in the repository, which I don't want to be included in grep results. So I mark the files as binary in gitattributes, then git grep just says "Binary file foo matches".
Re:Ripgrep is faster (2016) by burntsushi on Saturday September 08, 2018 @06:34PM (#17943177)
For ripgrep, you can achieve this via a custom ignore file, e.g., `echo '*.min.js' > .ignore`.

Another approach I've seen people take is to put `-M300` in your ripgrep config file, and then any super long lines are automatically omitted from output.

Re:Ripgrep is faster (2016) by h1d on Saturday September 08, 2018 @11:15PM (#17944143)
I've seen the few posts deciding to use .ignore as the file name but I hope this won't be a mistake in choosing the right name without enough discussion. Even for users it's hard to figure what the file is for.

I consider .grepignore to be more comprehensible.

Re:Ripgrep is faster (2016) by burntsushi on Saturday September 08, 2018 @11:52PM (#17944260)
You can also use .rgignore.
Re:Ripgrep is faster (2016) by JoshTriplett on Saturday September 08, 2018 @08:49PM (#17943678)
Have you considered parsing .gitattributes and offering support for reducing files marked as "binary" down to a "binary file matches" notice?
Re:Ripgrep is faster (2016) by burntsushi on Saturday September 08, 2018 @09:14PM (#17943744)
Nope. I don't think I've ever used .gitattributes. Might be a neat idea. Not sure.