Skip to content

Commit 93751a5

Browse files
committed
Merge branch 'gh/git-jump-pathname-with-sp' into seen
"git jump" (in contrib/) fails to parse the diff header correctly when a file has a space in its name, which has been corrected. Comments? * gh/git-jump-pathname-with-sp: git-jump: make `diff` work with filenames containing spaces
2 parents e5146f7 + 621ce9c commit 93751a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/git-jump/git-jump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ open_editor() {
4444
mode_diff() {
4545
git diff --no-prefix --relative "$@" |
4646
perl -ne '
47-
if (m{^\+\+\+ (.*)}) { $file = $1 eq "/dev/null" ? undef : $1; next }
47+
if (m{^\+\+\+ (.*?)\t?$}) { $file = $1 eq "/dev/null" ? undef : $1; next }
4848
defined($file) or next;
4949
if (m/^@@ .*?\+(\d+)/) { $line = $1; next }
5050
defined($line) or next;

0 commit comments

Comments
 (0)