diff options
Diffstat (limited to 'contrib/extract-authors.sh')
-rwxr-xr-x | contrib/extract-authors.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/extract-authors.sh b/contrib/extract-authors.sh new file mode 100755 index 0000000..486e906 --- /dev/null +++ b/contrib/extract-authors.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Based on +# https://github.com/cilium/cilium/blob/master/contrib/scripts/extract_authors.sh + +function extract_authors() { + authors=$(git shortlog --summary | awk '{$1=""; print $0}' | sed -e 's/^ //') + IFS=$'\n' + for i in $authors; do + name=$(git log --use-mailmap --author="$i" --format="%aN" | head -1) + mail=$(git log --use-mailmap --author="$i" --format="%aE" | head -1) + printf ' * %s <%s>\n' "$name" "$mail" + done +} + +extract_authors | uniq | sort |