From 703a8481c6fe5d833df567949e42f2208d2d03e1 Mon Sep 17 00:00:00 2001 From: Tobias Fendin Date: Thu, 12 Aug 2021 22:05:22 +0200 Subject: [PATCH 1/2] summary --dedup-by-email now compares email adresses case insensitive. --- bin/git-summary | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/git-summary b/bin/git-summary index 4acb19e2d..6e4d32f30 100755 --- a/bin/git-summary +++ b/bin/git-summary @@ -80,17 +80,18 @@ file_count() { dedup_by_email() { # in: - # 27 luo zexuan + # 27 luo zexuan # 7 罗泽轩 # out: # 34 luo zexuan LC_ALL=C awk ' { sum += $1 - if ($NF in emails) { - emails[$NF] += $1 + lastField = tolower($NF) + if (lastField in emails) { + emails[lastField] += $1 } else { - email = $NF + email = lastField emails[email] = $1 # set commits/email to empty $1=$NF="" From 5feb0db212041dbe9fa154fd3ac2765a99fa5b85 Mon Sep 17 00:00:00 2001 From: Tobias Fendin Date: Sat, 14 Aug 2021 14:44:21 +0200 Subject: [PATCH 2/2] Adopted git --dedup-by-email to the project coding style --- bin/git-summary | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/git-summary b/bin/git-summary index 6e4d32f30..eb724674f 100755 --- a/bin/git-summary +++ b/bin/git-summary @@ -87,11 +87,11 @@ dedup_by_email() { LC_ALL=C awk ' { sum += $1 - lastField = tolower($NF) - if (lastField in emails) { - emails[lastField] += $1 + last_field = tolower($NF) + if (last_field in emails) { + emails[last_field] += $1 } else { - email = lastField + email = last_field emails[email] = $1 # set commits/email to empty $1=$NF=""