From: Aina Niemetz Date: Tue, 13 Feb 2018 19:04:27 +0000 (-0800) Subject: Skip header for determining top contributors list. (#1603) X-Git-Tag: cvc5-1.0.0~5289 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=74b11e0bd7282014d8a8893d7abc25eb24731d79;p=cvc5.git Skip header for determining top contributors list. (#1603) --- 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 ,$gituser," | \ sed 's/PaulMeng/Paul Meng/' | \