3 ms·
I tried the above on one project large enough that git complained about the argument size, so if you run into this problem, do something like: git rev-list
by js2 13y ago
I tried the above on one project large enough that git complained about the argument size, so if you run into this problem, do something like:
git rev-list --all | (while read rev; do git grep -e <regexp> $rev; done)
The '--all' argument tells rev-list to emit the history of every single ref. You probably only want a branch. Also, this is a job for xargs:
git rev-list master | xargs git grep -e <regexp>