scripts/find-reviewer.sh

13 lines
302 B
Bash

function find-reviewer {
git rev-parse --show-toplevel >/dev/null 2>&1 &&
git log -1 --oneline --stat --name-only |
sed -ne '2,$p' |
while read FILE; do
GIT_PAGER=cat git log --format='%ae' -- "$FILE";\
done |
sort |
uniq -c |
sort -nr ||
echo "ERROR: '$PWD' is not a Git repository." >&2
}