summaryrefslogtreecommitdiff
path: root/contrib/get-authors
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/get-authors')
-rwxr-xr-xcontrib/get-authors20
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback