summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2018-02-13 11:04:27 -0800
committerGitHub <noreply@github.com>2018-02-13 11:04:27 -0800
commit74b11e0bd7282014d8a8893d7abc25eb24731d79 (patch)
treede8cefe5da21f8b49c675db0214c937041f6ff23 /contrib
parent1b0aa1c39ff7abe15bbd9305d376d10b007d69d0 (diff)
Skip header for determining top contributors list. (#1603)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/get-authors10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/get-authors b/contrib/get-authors
index 34ebdf5e3..c0f49fac9 100755
--- a/contrib/get-authors
+++ b/contrib/get-authors
@@ -22,8 +22,16 @@ while [ $# -gt 0 ]; do
f=$1
shift
contributors=
+ if [ -z "`grep " \*\* Top contributors" $f`" ]
+ then
+ header_lines=0
+ else
+ header_lines=`grep "\*\*\/" $f -m 1 -n | cut -d ':' -f 1`
+ if [ -z $header_lines ]; then header_lines=0; fi
+ fi
+ ((header_lines++))
total_lines=`wc -l "$f" | awk '{print$1}'`
- git blame --incremental "$f" | \
+ git blame --incremental -L $header_lines,$total_lines "$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," | \
sed 's/PaulMeng/Paul Meng/' | \
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback