mirror of
https://github.com/git/git.git
synced 2024-11-27 03:53:55 +08:00
Merge branch 'jk/jump-quickfix-fixes'
A few usability fixes to "git jump" (in contrib/). * jk/jump-quickfix-fixes: git-jump: ignore deleted files in diff mode git-jump: always specify column 1 for diff entries
This commit is contained in:
commit
621ac241be
@ -44,13 +44,13 @@ open_editor() {
|
||||
mode_diff() {
|
||||
git diff --no-prefix --relative "$@" |
|
||||
perl -ne '
|
||||
if (m{^\+\+\+ (.*)}) { $file = $1; next }
|
||||
if (m{^\+\+\+ (.*)}) { $file = $1 eq "/dev/null" ? undef : $1; next }
|
||||
defined($file) or next;
|
||||
if (m/^@@ .*?\+(\d+)/) { $line = $1; next }
|
||||
defined($line) or next;
|
||||
if (/^ /) { $line++; next }
|
||||
if (/^[-+]\s*(.*)/) {
|
||||
print "$file:$line: $1\n";
|
||||
print "$file:$line:1: $1\n";
|
||||
$line = undef;
|
||||
}
|
||||
'
|
||||
|
Loading…
Reference in New Issue
Block a user