git-grep to operate across who repository and not just CWD?
- From
- David Chanters <david.chanters@googlemail.com>
- Date
- Feb 28, 2011, 00:17 UTC
- Message-ID
- <AANLkTimnOSzF1o-fX-n7b26Qx2aLP3aU3pTMGY_f5hKy@mail.gmail.com>
Hi all,
[ Please Cc me as I am not subscribed to this list, thanks. ]
I'm wondering if there's an easy way to get git-grep (and I suppose other commands which operate on a per-repository level rather than per-tree) to work across the whole repository?
Often I will be in the depths of my git repository, run "git grep --options 'search string'", to find no results. Of course, then I remember that git grep doesn't work across the whole repository, it works like normal grep, and only considers the CWD onwards. Typically I end up cursing, using {push,pop}d to recall where I am, cd'ing to the root of the repository and running "git grep" from there and then poping my CWD to go back to where I was.
Is there some clever trickery or command-line flag I've not read about in the "git-grep" man page to make this idea more seamless?
TIA,
David