Skip to content

Commit

Permalink
feat(authors): add script to list commit authors with years
Browse files Browse the repository at this point in the history
  • Loading branch information
slodki committed May 20, 2018
1 parent ba03e9f commit 6c2abc8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .mailmap
@@ -0,0 +1,30 @@
# Proper Name <proper@email.xx> Commit Name <commit@email.xx>
# See https://git-scm.com/docs/git-blame#_mapping_authors
Tomasz Słodkowicz <slodki@users.noreply.github.com>
<slodki> <slodki@users.noreply.github.com>
Lisheng Guan <guanlisheng@gmail.com> <guanlisheng@7f5d68d0-c712-0410-839f-9b116a576cc5>
Lisheng Guan <guanlisheng@gmail.com>
Gabriele Villa <gabriele@villanet.it> <gabriele-v@users.noreply.github.com>
Gabriele Villa <gabriele@villanet.it> <gabriele@villanet.it>
Gabriele Villa <gabriele@villanet.it> <Gabriele-V>
Gabriele Villa <gabriele@villanet.it> <gabriele-v@7f5d68d0-c712-0410-839f-9b116a576cc5>
James Higley <siena123@mstar.net>
James Higley <siena123@mstar.net> <siena123@7f5d68d0-c712-0410-839f-9b116a576cc5>
Stefano Georgio <stef145g@gmail.com>
Stefano Georgio <stef145g@gmail.com> <stef145g@7f5d68d0-c712-0410-839f-9b116a576cc5>
Nikolay Akimov <nikolay.akimov@gmail.com>
Nikolay Akimov <nikolay.akimov@gmail.com> <vomikan@7f5d68d0-c712-0410-839f-9b116a576cc5>
Nikolay Akimov <nikolay.akimov@gmail.com> <vomikan@mail.ru>
<dwrj87@gmail.com> <dwrj87@users.noreply.github.com>
Madhan Kanagavel <madhan> <madhan@7f5d68d0-c712-0410-839f-9b116a576cc5>
Patrick O'Malley <omalleypat> <omalleypat@users.noreply.github.com>
Patrick O'Malley <omalleypat> <68omalley@gmail.com>
Patrick O'Malley <omalleypat> <omalleypat@7f5d68d0-c712-0410-839f-9b116a576cc5>
Tomáš Frťala <tomas.frtala@gmail.com>
Tomáš Frťala <tomas.frtala@gmail.com> <tomas.frtala@ardaco.com>
Tomáš Frťala <tomas.frtala@gmail.com> <tomasfrtala@users.noreply.github.com>
Yosef Shatsky <ysdevpub@gmail.com>
Yosef Shatsky <ysdevpub@gmail.com> <yshatsky@gmail.com>
<jlauria@hotmail.com> <s2108312@users.noreply.github.com>
Stephen Groat <stephen@egroat.com>
Stephen Groat <stephen@egroat.com> <stephengroat@users.noreply.github.com>
10 changes: 10 additions & 0 deletions util/list-authors.sh
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

declare -A users commits

while IFS=$'|' read -r user year; do
[[ ${users[$user]} != *$year* ]] && users[$user]+=" $year"
commits[$user]=$((${commits[$user]}+1))
done < <(git log --all --author-date-order --reverse --date=format:%Y --pretty="format:%aN <%aE>|%ad")

for u in "${!users[@]}"; do echo -e "${users[$u]}\t$u\t${commits[$u]}"; done | sort

2 comments on commit 6c2abc8

@gabriele-v
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slodki could you hard-reset repository and delete my mail address?
I don't know what it in public.

Thanks

@slodki
Copy link
Contributor Author

@slodki slodki commented on 6c2abc8 May 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabriele-v It was already there. This file only maps many existing e-mails to one.
Just try run git log --author=Gab or git shortlog -se from command-line.

Yes - I can remove your e-mail from this file but you will publish your e-mail tomorrow again with new commit :-(
It's impossible to rewrite all git history (your 229 existing commits) now. You should configure your local git client for the future commits with git config --local user.email <e-mail> or git config --global user.email <e-mail>.

Please sign in to comment.