]> git.cworth.org Git - notmuch/blob - devel/author-scan.sh
CLI/count: switch to new configuration framework
[notmuch] / devel / author-scan.sh
1 #!/bin/sh
2
3 FILE_EXCLUDE='corpora'
4 AUTHOR_EXCLUDE='uncrustify'
5 # based on the FSF guideline, for want of a better idea.
6 THRESHOLD=15
7
8 git ls-files | grep -v -e "$FILE_EXCLUDE" | xargs -n 1 -d \\n \
9                                                   git blame -w --line-porcelain -- | \
10     sed -n "/$AUTHOR_EXCLUDE/d; s/^[aA][uU][tT][hH][Oo][rR] //p" | \
11     sort -fd | uniq -ic | awk "\$1 >= $THRESHOLD" | sort -nr