mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'gh/git-jump-pathname-with-sp'
"git jump" (in contrib/) fails to parse the diff header correctly when a file has a space in its name, which has been corrected. * gh/git-jump-pathname-with-sp: git-jump: make `diff` work with filenames containing spaces
This commit is contained in:
@@ -44,7 +44,7 @@ open_editor() {
|
|||||||
mode_diff() {
|
mode_diff() {
|
||||||
git diff --no-prefix --relative "$@" |
|
git diff --no-prefix --relative "$@" |
|
||||||
perl -ne '
|
perl -ne '
|
||||||
if (m{^\+\+\+ (.*)}) { $file = $1 eq "/dev/null" ? undef : $1; next }
|
if (m{^\+\+\+ (.*?)\t?$}) { $file = $1 eq "/dev/null" ? undef : $1; next }
|
||||||
defined($file) or next;
|
defined($file) or next;
|
||||||
if (m/^@@ .*?\+(\d+)/) { $line = $1; next }
|
if (m/^@@ .*?\+(\d+)/) { $line = $1; next }
|
||||||
defined($line) or next;
|
defined($line) or next;
|
||||||
|
|||||||
Reference in New Issue
Block a user