git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-jump: ignore (custom) prefix in diff mode
@ 2012-09-17  1:21 Mischa POSLAWSKY
  2012-09-17  3:01 ` Mischa POSLAWSKY
  2012-09-17  5:24 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Mischa POSLAWSKY @ 2012-09-17  1:21 UTC (permalink / raw)
  To: git; +Cc: Jeff King

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>
---
Very useful script otherwise; thanks.

 contrib/git-jump/git-jump | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git contrib/git-jump/git-jump contrib/git-jump/git-jump
index a33674e..dc90cd6 100755
--- contrib/git-jump/git-jump
+++ 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;
-- 
1.7.12.165.g8cb9d9c

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-09-18  9:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17  1:21 [PATCH] git-jump: ignore (custom) prefix in diff mode Mischa POSLAWSKY
2012-09-17  3:01 ` Mischa POSLAWSKY
2012-09-17  5:22   ` Junio C Hamano
2012-09-18  2:52     ` Mischa POSLAWSKY
2012-09-18  3:57       ` Junio C Hamano
2012-09-18  9:00       ` Bert Wesarg
2012-09-17  6:03   ` perryh
2012-09-17  5:24 ` Junio C Hamano
2012-09-17 17:39   ` Jeff King
2012-09-17 19:48     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).