Messages in this thread | | | Date | Sun, 3 Mar 2013 19:39:11 -0800 | Subject | Re: Linux 3.9-rc1 | From | Linus Torvalds <> |
| |
On Sun, Mar 3, 2013 at 5:42 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > > git log v3.8.. --author=Torvalds --merges | > egrep '^ ((Merge)|(Pull)) .* from ' > > and then some nasty sed+sort crud, followed by some manual fixup. It's > the kind of thing perl is perfect for, but I'm not much of a perl > person, so I have never written a *good* script to just do this right.
Ok, this is still not good, but this at least makes my manual editing minimal. There's a few extra lines that match the pattern that need manual fixup, and some people with two different names (Ted vs Theodore) but other than that it looks ok.
So do the above git long + egrep pipeline, and then pipe it to the perl script below. I feel a git alias coming up in my future..
Real perl people may want to avert their eyes..
Linus
--- #!/usr/bin/perl -w use strict;
my (%map);
sub add_entry($$) { my ($key,$desc) = @_;
if (exists $map{$key}) { my $obj = $map{$key}; push(@$obj, $desc); } else { my @arr = ($desc); $map{$key} = \@arr; } }
sub input { while (<>) { my ($type,$desc,$key) = (/^ *(\S*) *(.*) from *(.*)/); chomp($key = $3); chomp($desc = $2); chop $key if ($key =~ /(:|\.)$/); add_entry($key, $desc); } }
sub by_name($$) { my ($a, $b) = @_; uc($a) cmp uc($b); }
sub output { my ($key);
foreach $key (sort by_name keys %map) { my ($obj, $desc);
$obj = $map{$key}; printf "%s: (%d)\n", $key, scalar(@$obj); print "\t$_\n" foreach @$obj; print "\n"; } }
input; output; exit(0)
| |