8 open GNUPLOT, "|gnuplot -persist";
9 $data = "/tmp/commit-graph-$$.dat";
10 print "Using file $data\n";
13 GNUPLOT->autoflush(1);
17 set format x "%y/%m/%d"
22 %authors = ('Michal S.' => 'sojka',
23 #'Martin' => '\(zidek\|mzi\|martin-eee\|martin-nb2\)',
26 #'Jirka' => '\(jirka\|kubia\)',
27 #'Marek' => '\(marek\|duch\)',
29 'Matous' => '\(ehiker\|pokor\)',
30 'Michal V.' => '\(zandar\|vokac\)',
33 foreach $author(sort keys %authors) {
34 $cmd = qq/git log --pretty=format:"commit %ct %s" --author='$authors{$author}' --no-merges --reverse --numstat @ARGV/;
41 if (/^commit (\d+)/) { $time=$1; $num_commits++; $printed=0; }
42 elsif (/(\d+)\s+(\d+)/) {
45 print DATA "$time $num_commits $added_lines\n";
49 if ($num_commits > 0) {
51 print DATA "$time $num_commits $added_lines\n";
55 delete $authors{$author};
62 foreach $author(sort keys %authors) {
63 push @plots, qq/"$data" index $i using 1:2 with linespoints title "$author"/;
66 print GNUPLOT "set ylabel \"Number of commits\"\n";
67 print GNUPLOT "plot ", join(", ", @plots), ";\n";
71 foreach $author(sort keys %authors) {
72 push @plots, qq/"$data" index $i using 1:3 with linespoints title "$author"/;
75 print GNUPLOT "set ylabel \"Added lines\"\n";
76 # print GNUPLOT "set logscale y\n";
77 print GNUPLOT "plot ", join(", ", @plots), ";\n";