Re: Add "git grep" helper
- From
Junio C Hamano <junkio@cox.net>
- Date
- Sep 12, 2005, 21:45 UTC
- Message-ID
- <7vbr2y7yfd.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0509121203210.4098@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> Very convenient shorthand for > > git-ls-files [file-patterns] | xargs grep <pattern> > > which I tend to do all the time.
Great minds think alike. I stopped using 'grep-find' in Emacs and use "git-ls-fiels -z | xargs -0 grep" instead these days. Thanks for the patch; applied.
I do not much care about other grep flags but I think you forgot to special case '-e', so what is in the "master" branch has one extra commit on top of it for that (it does not seem to have percolated down yet).