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 <git@shiar.nl> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mischa POSLAWSKY committed
Sep 17, 2012 at 03:21 UTC
6108b04b708f6aa5d4a9349a240b5261fdab0cdf
1 file changed
+2
-2
contrib/git-jump/git-jump
+2
-2
@@ -21,9 +21,9 @@ open_editor() {
21
}
22
23
mode_diff() {
24
- git diff --relative "$@" |
24
+ git diff --no-prefix --relative "$@" |
25
perl -ne '
26
- if (m{^\+\+\+ b/(.*)}) { $file = $1; next }
26
+ if (m{^\+\+\+ (.*)}) { $file = $1; next }
27
defined($file) or next;
28
if (m/^@@ .*\+(\d+)/) { $line = $1; next }
29
defined($line) or next;