mirror of
https://github.com/git/git
synced 2024-11-05 04:53:18 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue