diff options
author | PaulMeng <baolmeng@gmail.com> | 2016-04-20 14:43:18 -0500 |
---|---|---|
committer | PaulMeng <baolmeng@gmail.com> | 2016-04-20 14:43:18 -0500 |
commit | 904ffb6e73402bae537aa89e7fd8f0ab2e9d60e2 (patch) | |
tree | d96bb0c974bdea6170957d3e39d47a98f5c85ca0 /contrib/get-authors | |
parent | a0054e9cc78822416d745e955c30f69cbb2a3aa7 (diff) |
update from the master
Diffstat (limited to 'contrib/get-authors')
-rwxr-xr-x | contrib/get-authors | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/contrib/get-authors b/contrib/get-authors index 2ff09b0ef..4c1bb0233 100755 --- a/contrib/get-authors +++ b/contrib/get-authors @@ -21,23 +21,11 @@ fi while [ $# -gt 0 ]; do f=$1 shift - original_author= - major_contributors= - minor_contributors= + 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;} /^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 | + 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 -nr | head -n 3 | ( while read lines author; do - pct=$((100*$lines/$total_lines)) - if [ "$author" != "$original_author" ]; then - if [ $pct -ge 10 ]; then - major_contributors="${major_contributors:+$major_contributors, }$author" - else - minor_contributors="${minor_contributors:+$minor_contributors, }$author" - fi - fi + contributors="${contributors:+$contributors, }$author" done; \ - echo "$original_author" - echo "${major_contributors:-none}" - echo "${minor_contributors:-none}" ) | eval "$strip_email" + echo "$contributors") | eval "$strip_email" done |