git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] Use regex for :/ matching
Date: Mon, 3 Dec 2007 12:30:22 -0500	[thread overview]
Message-ID: <20071203173022.GA19219@coredump.intra.peff.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712031052410.27959@racer.site>

On Mon, Dec 03, 2007 at 10:55:15AM +0000, Johannes Schindelin wrote:

> > The sha1 syntax :/ used to be a strict prefix match.
> > Instead, let's use a regular expression, which can save on
> Heh: 
> http://repo.or.cz/w/git/dscho.git?a=commitdiff;h=2546cd9732bb8d4bc1d2485ba7bbc1d5c8bac935

Hmm, the major difference seems to be that you grep the entire body,
whereas I grep just the oneline. My goal was to avoid matching the
search string in the message of a merge commit with merge summaries
turned on.

> Except that I did not support ".." (does yours?), _and_ that my patch is 
> not as nice as yours.

No, I didn't. I'm not sure it is sane, since :/ can contain free-form
text (and with a regex, .. is not that unlikely). And you can always do
git-log --not :/foo :/bar

> But then, my patch also works when save_commit_buffer == 0.  But I can 
> refactor this into its own patch, since it really is a separate issue.

Agreed.

-Peff

  reply	other threads:[~2007-12-03 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03  4:32 [PATCH/RFC] Use regex for :/ matching Jeff King
2007-12-03 10:55 ` Johannes Schindelin
2007-12-03 17:30   ` Jeff King [this message]
2007-12-03 18:17     ` Junio C Hamano
2007-12-06  5:52       ` Jeff King
2007-12-06  6:33         ` Junio C Hamano
2007-12-06  6:39           ` Jeff King
2007-12-06 12:13             ` Johannes Schindelin
2007-12-03 18:42     ` [PATCH] Allow ':/<oneline-prefix>' syntax to work with save_commit_buffer == 0 Johannes Schindelin
2007-12-03 21:34       ` Junio C Hamano
2007-12-03 22:52         ` Johannes Schindelin

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=20071203173022.GA19219@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).