Skip to content

Commit

Permalink
git-jump: ignore (custom) prefix in diff mode
Browse files Browse the repository at this point in the history
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>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Mischa POSLAWSKY authored and Junio C Hamano committed Sep 17, 2012
1 parent 2ce4fee commit 6108b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/git-jump/git-jump
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6108b04

Please sign in to comment.