git-grep: boolean expression on pattern matching.
commit79d3696cfb438467749160481c6119e43d4d2851
authorJunio C Hamano <junkio@cox.net>
Fri, 30 Jun 2006 10:04:05 +0000 (30 03:04 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 5 Jul 2006 23:41:23 +0000 (5 16:41 -0700)
tree408970033f02859ce46f5e668fae88c0e2e6d0db
parentbc483d04804888c2da64e4c6685c2860a9041122
git-grep: boolean expression on pattern matching.

This extends the behaviour of git-grep when multiple -e options
are given.  So far, we allowed multiple -e to behave just like
regular grep with multiple -e, i.e. the patterns are OR'ed
together.

With this change, you can also have multiple patterns AND'ed
together, or form boolean expressions, like this (the
parentheses are quoted from the shell in this example):

$ git grep -e _PATTERN --and \( -e atom -e token \)

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c