git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mischa POSLAWSKY <git@shiar.nl>, git@vger.kernel.org
Subject: Re: [PATCH] git-jump: ignore (custom) prefix in diff mode
Date: Mon, 17 Sep 2012 13:39:45 -0400	[thread overview]
Message-ID: <20120917173945.GA22000@sigill.intra.peff.net> (raw)
In-Reply-To: <7vtxuxw7bf.fsf@alter.siamese.dyndns.org>

On Sun, Sep 16, 2012 at 10:24:04PM -0700, Junio C Hamano wrote:

> Mischa POSLAWSKY <git@shiar.nl> writes:
> 
> > Matching the default file prefix b/ does not yield any results if config
> > option diff.noprefix or diff.mnemonicprefix is enabled.
> >
> > Signed-off-by: Mischa POSLAWSKY <git@shiar.nl>
> > ---
> > Very useful script otherwise; thanks.
> >
> >  contrib/git-jump/git-jump | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git contrib/git-jump/git-jump contrib/git-jump/git-jump
> > index a33674e..dc90cd6 100755
> > --- contrib/git-jump/git-jump
> > +++ contrib/git-jump/git-jump
> > @@ -21,9 +21,9 @@ open_editor() {
> >  }
> >  
> >  mode_diff() {
> > -	git diff --relative "$@" |
> > +	git diff --no-prefix --relative "$@" |
> >  	perl -ne '
> > -	if (m{^\+\+\+ b/(.*)}) { $file = $1; next }
> > +	if (m{^\+\+\+ (.*)}) { $file = $1; next }
> >  	defined($file) or next;
> >  	if (m/^@@ .*\+(\d+)/) { $line = $1; next }
> >  	defined($line) or next;
> 
> Makes sense to me.  Peff?

Yes, looks obviously correct. Thanks.

Acked-by: Jeff King <peff@peff.net>

-Peff

  reply	other threads:[~2012-09-17 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17  1:21 [PATCH] git-jump: ignore (custom) prefix in diff mode Mischa POSLAWSKY
2012-09-17  3:01 ` Mischa POSLAWSKY
2012-09-17  5:22   ` Junio C Hamano
2012-09-18  2:52     ` Mischa POSLAWSKY
2012-09-18  3:57       ` Junio C Hamano
2012-09-18  9:00       ` Bert Wesarg
2012-09-17  6:03   ` perryh
2012-09-17  5:24 ` Junio C Hamano
2012-09-17 17:39   ` Jeff King [this message]
2012-09-17 19:48     ` Junio C Hamano

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=20120917173945.GA22000@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@shiar.nl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).