From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] git-grep: --and to combine patterns with and instead of or
Date: Fri, 30 Jun 2006 21:11:31 +0200 [thread overview]
Message-ID: <e83t0m$4s0$2@sea.gmane.org> (raw)
In-Reply-To: 7v1wt6ik4x.fsf@assigned-by-dhcp.cox.net
Junio C Hamano wrote:
> The --near Matthias talk about is syntactically not like --and
> but more like --not. It takes a condition for a line after
> that, and loosens it to cover nearby lines. So "-e A"
> means "the line must have A on it" but "--near -e A" means "the
> line must be nearby a line that satisfies `-e A'".
>
> Matthias's "--near EXP" is spelled as "-e '' --near EXP" (the
> first one is always true) with our syntax, in other words.
>
> I do not think either of these semantics is invalid; they are
> just different. The version by Matthias is more general and
> more expressive.
It also uses the fact that grep search for _lines_, the fact I have forgot
about. But if we cannot search for multiline regexp using git-grep,
Matthias version is truly more expressive, especially with context limiting
extension.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-06-30 19:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-25 15:38 [PATCH] git-grep: allow patterns starting with - Matthias Lederhofer
2006-06-25 15:47 ` Timo Hirvonen
2006-06-25 16:07 ` [PATCH] correct documentation for git grep Matthias Lederhofer
2006-06-25 23:10 ` Johannes Schindelin
2006-06-25 23:39 ` Matthias Lederhofer
2006-06-26 0:06 ` Matthias Lederhofer
2006-06-26 6:59 ` Johannes Schindelin
2006-06-26 0:02 ` [PATCH] git-grep: --and to combine patterns with and instead of or Matthias Lederhofer
2006-06-29 22:20 ` Thomas Glanzmann
2006-06-29 22:44 ` Junio C Hamano
2006-06-30 2:25 ` Matthias Lederhofer
2006-06-30 4:13 ` Junio C Hamano
2006-06-30 7:46 ` Matthias Lederhofer
2006-06-30 7:56 ` Junio C Hamano
2006-06-30 10:08 ` [PATCH] git-grep: boolean expression on pattern matching Junio C Hamano
2006-06-30 10:24 ` Jakub Narebski
2006-06-30 10:29 ` Junio C Hamano
2006-06-30 15:11 ` Matthias Lederhofer
2006-06-30 10:57 ` [PATCH] git-grep: --and to combine patterns with and instead of or Matthias Lederhofer
2006-06-30 15:57 ` Junio C Hamano
2006-06-30 17:04 ` Matthias Lederhofer
2006-06-30 17:18 ` Junio C Hamano
2006-06-30 17:33 ` Jakub Narebski
2006-06-30 17:49 ` Matthias Lederhofer
2006-06-30 17:58 ` Junio C Hamano
2006-06-30 18:20 ` Matthias Lederhofer
2006-06-30 18:03 ` Jakub Narebski
2006-06-30 18:16 ` Junio C Hamano
2006-06-30 19:11 ` Jakub Narebski [this message]
2006-06-30 20:26 ` Junio C Hamano
2006-07-03 7:54 ` Andreas Ericsson
2006-06-25 16:18 ` [PATCH] git-grep: allow patterns starting with - Matthias Lederhofer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e83t0m$4s0$2@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.