[openssl-commits] [tools] master update
Rich Salz
rsalz at openssl.org
Tue Nov 7 17:00:56 UTC 2017
The branch master has been updated
via cf3acbc8a45ca5d8aec275f2ec37463681f0b48a (commit)
from 22a99d3c8611bc0fa48895197292cb652fe80ae2 (commit)
- Log -----------------------------------------------------------------
commit cf3acbc8a45ca5d8aec275f2ec37463681f0b48a
Author: Rich Salz <rsalz at openssl.org>
Date: Tue Nov 7 12:00:52 2017 -0500
Add add-counts filter
-----------------------------------------------------------------------
Summary of changes:
license/add-counts | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 license/add-counts
diff --git a/license/add-counts b/license/add-counts
new file mode 100644
index 0000000..e842fc4
--- /dev/null
+++ b/license/add-counts
@@ -0,0 +1,32 @@
+#! /usr/bin/env perl
+# Annotate the output of "get-followups -d" to show the stats
+# of each commit.
+use strict;
+use warnings;
+
+while ( <> ) {
+ unless ( /([0-da-f]{8}) .*/ ) {
+ print;
+ next;
+ }
+ my $cid = $1;
+ my $line = $_;
+ if ( $cid eq 'd02b48c6' ) {
+ print "931 +17534 -0 ", $_;
+ next;
+ }
+ my $pattern = "$cid^..$cid";
+ my $files = 0;
+ my $adds = 0;
+ my $dels = 0;
+ open my $F, "git diff --numstat $pattern|"
+ || die "Can't open git diff, $!\n";
+ while ( <$F> ) {
+ $files++;
+ next unless /(\d+)\s+(\d+)/;
+ $adds += int($1);
+ $dels += int($2);
+ }
+ close $F || die "Can't close git diff, $!\n";
+ print "$files +$adds -$dels $line";
+}
More information about the openssl-commits
mailing list