From 938e89c08ff1e41d18a159a5f125a860f7f83bcc Mon Sep 17 00:00:00 2001 From: Valentin Haenel <valentin.haenel@gmx.de> Date: Mon, 4 Jun 2012 16:08:48 +0200 Subject: [PATCH] use git shortlog and .mailmap to remove duplicates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 <vincent@demeester.fr> Richard Hartmann <richih+github.com@richih.org> Richard Hartmann <richih.mailinglist@gmail.com> Dieter Plaetinck <dieter@plaetinck.be> Corey Quinn <corey@sequestered.net> Gernot Schulz <post@gernot-schulz.com> 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 <vincent@demeester.fr> Richard Hartmann <richih.mailinglist@gmail.com> Dieter Plaetinck <dieter@plaetinck.be> Corey Quinn <corey@sequestered.net> Gernot Schulz <post@gernot-schulz.com> Alphabetical sorting on the second field (which, incidentally, may be a middle name) is preserved. --- .mailmap | 1 + tools/list_AUTHORS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..bf08497 --- /dev/null +++ b/.mailmap @@ -0,0 +1 @@ +Richard Hartmann <richih.mailinglist@gmail.com> <richih+github.com@richih.org> 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 -- GitLab