Re: [PATCH] git-grep: --and to combine patterns with and instead of or
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 29, 2006, 22:44 UTC
- Message-ID
- <7vejx7oa3x.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060629222009.GA9310@cip.informatik.uni-erlangen.de>
Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:
Show 5 quoted lines
> Hello, > >> *AND* more than one pattern. (something I miss in normal grep) > > so do I.
So do I.
I am wondering if we would rather want to do something like expression `find` command let's you build. In other words:
git grep --extended-expression '(' 'foo' -o 'bar' ')' -a 'frotz'might be what we would eventually want. And I have this nagging suspicion that if we allow to say something like this
git grep --and -e a -e b
right now, it would make it more cumbersome (read: backward compatibility wart) to support both styles later.
I could be talked into
git grep -e a -a -e b
but that would already be building that expression engine, so...