From 6108b04b708f6aa5d4a9349a240b5261fdab0cdf Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 17 Sep 2012 03:21:55 +0200 Subject: [PATCH] git-jump: ignore (custom) prefix in diff mode 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 Acked-by: Jeff King Signed-off-by: Junio C Hamano --- contrib/git-jump/git-jump | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump index a33674e47..dc90cd637 100755 --- a/contrib/git-jump/git-jump +++ b/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; -- 2.26.2