author | Junio C Hamano <junkio@cox.net> | |
Fri, 30 Jun 2006 10:04:05 +0000 (03:04 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 5 Jul 2006 23:41:23 +0000 (16:41 -0700) | ||
commit | 79d3696cfb438467749160481c6119e43d4d2851 | |
tree | 408970033f02859ce46f5e668fae88c0e2e6d0db | tree | snapshot |
parent | bc483d04804888c2da64e4c6685c2860a9041122 | commit | diff |
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>
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 | diff | blob | history |