diff options
Diffstat (limited to 'mut/vis/vis-quickfix/gitw')
| -rwxr-xr-x | mut/vis/vis-quickfix/gitw | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mut/vis/vis-quickfix/gitw b/mut/vis/vis-quickfix/gitw new file mode 100755 index 0000000..0f17645 --- /dev/null +++ b/mut/vis/vis-quickfix/gitw @@ -0,0 +1,20 @@ +#!/bin/sh + +git diff --no-prefix --no-ext-diff --relative -U0 | +awk ' +/^\+\+\+ / { + file = $2 + next +} + +file && /^@@/ { + match($0, /\+[0-9]+/) + line = substr($0, RSTART + 1, RLENGTH - 1) + next +} + +line && /^[+-]/ { + printf "%s:%d:%s\n", file, line, $0 + line = 0 +} +' |
