diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-22 13:13:20 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-22 13:13:20 -0700 |
| commit | d08436df5f686c0d9419717eaeba16bb4ebb3719 (patch) | |
| tree | d92f517ae26a7661d516c0c7dba6228a9ee02ee3 | |
| parent | c72d5bbf49c26c73cef41cc6a82e95b53df5f534 (diff) | |
| parent | 621ce9c1c6cfe5a6467ef62cb81992b3a318b70e (diff) | |
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
| -rwxr-xr-x | contrib/git-jump/git-jump | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump index 3f69675961..8d1d5d79a6 100755 --- a/contrib/git-jump/git-jump +++ b/contrib/git-jump/git-jump @@ -44,7 +44,7 @@ open_editor() { mode_diff() { git diff --no-prefix --relative "$@" | 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; if (m/^@@ .*?\+(\d+)/) { $line = $1; next } defined($line) or next; |
