summaryrefslogtreecommitdiff
path: root/contrib/git-jump
diff options
context:
space:
mode:
authorLibravatar Mischa POSLAWSKY <git@shiar.nl>2012-09-17 03:21:55 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-17 12:31:57 -0700
commit6108b04b708f6aa5d4a9349a240b5261fdab0cdf (patch)
tree7e3cc7dd4cd534d0b6a92705370c0830d7e17b5b /contrib/git-jump
parentDocumentation: indent-with-non-tab uses "equivalent tabs" not 8 (diff)
downloadtgif-6108b04b708f6aa5d4a9349a240b5261fdab0cdf.tar.xz
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>
Diffstat (limited to 'contrib/git-jump')
-rwxr-xr-xcontrib/git-jump/git-jump4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump
index a33674e47a..dc90cd6379 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;