builtin-grep: workaround for non GNU grep.
authorLinus Torvalds <torvalds@osdl.org>
Wed, 17 May 2006 18:12:22 +0000 (11:12 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 17 May 2006 22:51:38 +0000 (15:51 -0700)
commitbbb66c60613fe89c58d7c97a92e067add7056f4d
treedefbdda7c8555731789970d969265587d499c734
parente9ce27543d29aa23bb4740a241339c6d42674f7d
builtin-grep: workaround for non GNU grep.

Of course, it still ignores the fact that not all grep's support some of
the flags like -F/-L/-A/-C etc, but for those cases, the external grep
itself will happily just say "unrecognized option -F" or similar.

So with this change, "git grep" should handle all the flags the native
grep handles, which is really quite fine. We don't _need_ to expose
anything more, and if you do want our extensions, you can get them with
"--uncached" and an up-to-date index.

No configuration necessary, and we automatically take advantage of any
native grep we have, if possible.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c