diff options
author | Franck Cuny <franckcuny@gmail.com> | 2016-01-17 07:17:17 -0800 |
---|---|---|
committer | Franck Cuny <franckcuny@gmail.com> | 2016-01-17 07:17:17 -0800 |
commit | e58a6497d050480c56b9689004b9ded1cc2b0b9d (patch) | |
tree | 291b4ae5b114d06d96498f2312a9ab3e466ca501 /bin/git-blame-stats | |
parent | [emacs] some small changes to the UI. (diff) | |
download | emacs.d-e58a6497d050480c56b9689004b9ded1cc2b0b9d.tar.gz |
Remove configuration for `vim` and all the scripts
No need to carry a configuration for `vim` anymore, and most of the scripts are either useless, or have moved to the *toolbox* repository on GitHub (and are now in go, and sometimes with tests).
Diffstat (limited to 'bin/git-blame-stats')
-rwxr-xr-x | bin/git-blame-stats | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/bin/git-blame-stats b/bin/git-blame-stats deleted file mode 100755 index 4f83cba..0000000 --- a/bin/git-blame-stats +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -use Getopt::Long; -use POSIX qw(ceil); -use strict; -Getopt::Long::Configure(qw(bundling)); -my %authors; -my $total; -my $files; -my $rev = shift(@ARGV) || "HEAD"; - -foreach my $file (`git ls-tree --name-only -r $rev`) { - chomp($file); - print STDERR "Processing $file\n"; - foreach my $line (`git blame -M -w $rev -- "$file"`) { - chomp($line); - if (substr($line, 0, 1) eq "^") { - ++$authors{"*initial checkin"}; - } else { - $line =~ s[^.*?\((.*?)\s*\d{4}-\d{2}-\d{2}.*][$1]; - ++$authors{$line}; - } - ++$total; - } -} - -print "Total lines: $total\n"; -my $i = 0; -my $author_ind = ceil(log(scalar(keys %authors)) / log(10)); -my $lines_ind = ceil(log($total) / log(10)); -foreach my $author (sort { $authors{$b} <=> $authors{$a} } keys %authors) { - printf "%${author_ind}s %${lines_ind}u %5.2f%% %s\n", - sprintf("#%u", ++$i), - $authors{$author}, - $authors{$author} * 100 / $total, - $author; -} |