notmuch/devel/author-scan.sh
David Bremner 126347b694 Import notmuch_0.38.2.orig.tar.xz
[dgit import orig notmuch_0.38.2.orig.tar.xz]
2023-12-01 07:51:09 -04:00

11 lines
425 B
Bash

#!/bin/sh
FILE_EXCLUDE='corpora'
AUTHOR_EXCLUDE='uncrustify'
# based on the FSF guideline, for want of a better idea.
THRESHOLD=15
git ls-files | grep -v -e "$FILE_EXCLUDE" | tr '\n' '\0' | xargs -0 -n 1 \
git blame -w --line-porcelain -- | \
sed -n "/$AUTHOR_EXCLUDE/d; s/^[aA][uU][tT][hH][Oo][rR] //p" | \
sort -fd | uniq -ic | awk "\$1 >= $THRESHOLD" | sort -nr