From: Jeff King Date: Mon, 17 Sep 2012 17:39:45 GMT Subject: Re: [PATCH] git-jump: ignore (custom) prefix in diff mode Message-ID: <20120917173945.GA22000@sigill.intra.peff.net> 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 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 > > --- > > 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