Skip to content

Commit 6108b04

Browse files
Mischa POSLAWSKYgitster
authored andcommitted
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 <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2ce4fee commit 6108b04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/git-jump/git-jump

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ open_editor() {
2121
}
2222

2323
mode_diff() {
24-
git diff --relative "$@" |
24+
git diff --no-prefix --relative "$@" |
2525
perl -ne '
26-
if (m{^\+\+\+ b/(.*)}) { $file = $1; next }
26+
if (m{^\+\+\+ (.*)}) { $file = $1; next }
2727
defined($file) or next;
2828
if (m/^@@ .*\+(\d+)/) { $line = $1; next }
2929
defined($line) or next;

0 commit comments

Comments
 (0)