▲ | EnPissant 2 days ago | |
I'm just trying to be helpful, not call you out. I've implemented gitignore aware file scanning before, and it was slower than git native operations when you only care about tracked files. It's the speed that is the part I was speaking too, not the semantics. | ||
▲ | burntsushi 2 days ago | parent [-] | |
Yes, I agree, `git ls-files` can indeed be faster than just `rg --files`. On my Chromium checkout:
But the semantics here are important, because ripgrep doesn't only try to approximate `git ls-files`. It also needs to deal with `.rgignore` and `.ignore`. And no git repository state will help there. ripgrep also supports respecting `.gitignore` even when it isn't inside a git repository. |