chiark
/
gitweb
/
~ianmdlvl
/
vinegar-ip.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Probability adjustment.
[vinegar-ip.git]
/
mdiff-summarise.pl
1
#!/usr/bin/perl -n
2
next if m/^\+/;
3
if (m/^[- ](\d+)$/) {
4
$nlno= $1;
5
next;
6
} elsif (defined $nlno) {
7
m/^[- ] *\S/ or die;
8
s/^([- ]) / $1. sprintf "%-6d ", $nlno /e;
9
undef $nlno;
10
}
11
die if defined $lno;
12
next if m/^[- ] \s\s/;
13
next if m/^\-\-\-|^\@\@/;
14
next if m/^ /;
15
die unless m/^\-/;
16
print or die $!;