notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
blob 23854f391a1f76fefce19c579de00d059c4d0b3c 425 bytes (raw)
name: devel/author-scan.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 
#!/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

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

git clone https://yhetil.org/notmuch.git