summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2013-12-05 14:40:18 -0500
committerMorgan Deters <mdeters@cs.nyu.edu>2013-12-05 15:06:19 -0500
commitc0b0632a83ca1e997b9002bf9e67b0dbbbd154b1 (patch)
tree2626779846c1702645ee7792dc9aa681190bc2b4 /contrib
parent9ac41cbe841066f5a222ef26bae227afc3bac3dc (diff)
Script fixes; when determining authorship of source files, don't count copyright-updating commits.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/get-authors2
-rwxr-xr-xcontrib/update-copyright.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/get-authors b/contrib/get-authors
index 0fe71dca3..508408006 100755
--- a/contrib/get-authors
+++ b/contrib/get-authors
@@ -26,7 +26,7 @@ while [ $# -gt 0 ]; do
minor_contributors=
total_lines=`wc -l "$f" | awk '{print$1}'`
original_author=`git log --use-mailmap --pretty="format:%aN <%aE>" "$f" | tail -1`
- git blame --incremental "$f" | gawk '/^[0-9a-f]+ [0-9]+ [0-9]+ [0-9]+$/ {nl=$4;} /^author / {$1=""; author=$0;} /^author-mail / {mail=$2} /^filename / {while(nl--) {print author,mail}}' | sed "s,Not Committed Yet <not.committed.yet>,$gituser," | sort | uniq -c | sort -n |
+ git blame --incremental "$f" | gawk '/^[0-9a-f]+ [0-9]+ [0-9]+ [0-9]+$/ {nl=$4;} /^summary .*copyright/ {nl=0} /^author / {$1=""; author=$0;} /^author-mail / {mail=$2} /^filename / {while(nl--) {print author,mail}}' | sed "s,Not Committed Yet <not.committed.yet>,$gituser," | sort | uniq -c | sort -n |
( while read lines author; do
pct=$((100*$lines/$total_lines))
if [ "$author" != "$original_author" ]; then
diff --git a/contrib/update-copyright.pl b/contrib/update-copyright.pl
index f7ce15f6c..720e69d16 100755
--- a/contrib/update-copyright.pl
+++ b/contrib/update-copyright.pl
@@ -63,7 +63,7 @@ use Fcntl ':mode';
my $dir = $0;
$dir =~ s,/[^/]+/*$,,;
-if($#ARGV >= 0 && $ARGV[0] eq '-h' || $ARGV[0] eq '--help') {
+if($#ARGV >= 0 && ($ARGV[0] eq '-h' || $ARGV[0] eq '--help')) {
open(my $SELF, $0) || die "error opening $0 for reading";
while($_ = <$SELF>) {
last if !/^#/;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback