summaryrefslogtreecommitdiff
path: root/contrib/get-authors
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/get-authors')
-rwxr-xr-xcontrib/get-authors10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/get-authors b/contrib/get-authors
index ef6abff8e..118ca4466 100755
--- a/contrib/get-authors
+++ b/contrib/get-authors
@@ -2,13 +2,15 @@
#
# get-authors
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
-# Copyright (c) 2009, 2010, 2011 The CVC4 Project
+# Copyright (c) 2009-2013 The CVC4 Project
#
# usage: get-authors [ files... ]
#
-# This script uses svn to get the original author
+# This script uses git to get the original author
#
+gituser="`git config user.name` <`git config user.email`>"
+
while [ $# -gt 0 ]; do
f=$1
shift
@@ -16,8 +18,8 @@ while [ $# -gt 0 ]; do
major_contributors=
minor_contributors=
total_lines=`wc -l "$f" | awk '{print$1}'`
- original_author=`svn log -q --incremental "$f" | tail -1 | awk '{print$3}'`
- svn blame "$f" | awk '{print$2}' | sort | uniq -c | sort -n |
+ original_author=`git log --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 |
( while read lines author; do
pct=$((100*$lines/$total_lines))
if [ "$author" != "$original_author" ]; then
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback