News for hackers. Stuff that matters.
Re:Why GNU grep is fast (2010) by js2 on Sunday July 24, 2022 @12:15PM (#32214840)
> By the way, it will use .gitignore files in a git directory.

If I'm in a repo, I'm using `git grep`.

That makes `rg` a mostly redundant tool for me since it's optimized for searching source code. I can't really use it as a general purpose replacement for grep since if it doesn't find anything I'm left wondering whether what I'm searching is not really there or whether `rg` just didn't bother to check. Even with `--no-ignore --all`, I'm still not sure whether it searches everything. It's one of those tools that I find is too clever for my own good.

So when `git grep` doesn't cover my use case, my fall back is `find | grep` which contains no magic and I know exactly what it's searching.

Re:Why GNU grep is fast (2010) by mkhnews on Sunday July 24, 2022 @08:30PM (#32219286)
In particular, ’rg ‐uuu’ should search the same exact content as ’grep ‐r’.
Re:Why GNU grep is fast (2010) by js2 on Sunday July 24, 2022 @09:04PM (#32219469)
Thank you. This inspired me to read the ripgrep man page. I think I must have been confusing ripgrep's behavior with the earlier ack (or maybe ag) tool which only searched known extensions by default. I see now that ripgrep only does that if explicitly given a --type option.
Re:Why GNU grep is fast (2010) by heywoodlh on Sunday July 24, 2022 @02:30PM (#32216248)
Whoa, I didn't even know about `git grep`. Sure enough, `man git-grep` has a bunch of relevant info! Thanks for sharing this.

I feel like there are a billion features in git (like this) that I don't know about.

Re:Why GNU grep is fast (2010) by nicoburns on Sunday July 24, 2022 @07:53PM (#32219028)
It’s handy if you want to search more than one repo at once. I believe you can do ‘rg -uuu’ as a shorthand to disable all ignores