From: Valentin Haenel Date: Mon, 4 Jun 2012 14:08:48 +0000 (+0200) Subject: use git shortlog and .mailmap to remove duplicates X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/938e89c08ff1e41d18a159a5f125a860f7f83bcc?ds=sidebyside use git shortlog and .mailmap to remove duplicates When using the basic log command one of the authors shows up twice: zsh» git log --all --format='%an <%ae>' | sort -u -k2 Vincent Demeester Richard Hartmann Richard Hartmann Dieter Plaetinck Corey Quinn Gernot Schulz If you instead use the git shortlog version with the .mailmap file you get: zsh» git shortlog -se --all | cut -f1 --complement | sort -u -k2 Vincent Demeester Richard Hartmann Dieter Plaetinck Corey Quinn Gernot Schulz Alphabetical sorting on the second field (which, incidentally, may be a middle name) is preserved. --- diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..bf08497 --- /dev/null +++ b/.mailmap @@ -0,0 +1 @@ +Richard Hartmann diff --git a/tools/list_AUTHORS b/tools/list_AUTHORS index 2b91ac9..3518205 100755 --- a/tools/list_AUTHORS +++ b/tools/list_AUTHORS @@ -2,4 +2,4 @@ echo 'Alphabetical list of everyone who ever committed to this repository ' -git log --all --format='%an <%ae>' | sort -u -k2 +git shortlog -se --all | cut -f1 --complement | sort -u -k2