mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
Merge pull request #937 from tfendin/dedup_email_case_insensitive
Compare email adresses case insensitive in --dedup-by-email
This commit is contained in:
commit
4de7b34c9f
|
|
@ -90,17 +90,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=""
|
||||
|
|
|
|||
Loading…
Reference in a new issue