Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare email adresses case insensitive in --dedup-by-email #937

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions bin/git-summary
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,18 @@ file_count() {

dedup_by_email() {
# in:
# 27 luo zexuan <luozexuan@xxx.com>
# 27 luo zexuan <LuoZexuan@xxx.com>
# 7 罗泽轩 <luozexuan@xxx.com>
# out:
# 34 luo zexuan
LC_ALL=C awk '
{
sum += $1
if ($NF in emails) {
emails[$NF] += $1
last_field = tolower($NF)
if (last_field in emails) {
emails[last_field] += $1
} else {
email = $NF
email = last_field
emails[email] = $1
# set commits/email to empty
$1=$NF=""
Expand Down