filter-repo: ignore case for email address with mailmap

`git shortlog` ignores the case when matching the email address. As
such, `git filter-repo` should do the same.

Signed-off-by: Stefan Lietzau <lietzaustefan@gmail.com>
[en: fixed a small logic error, tweaked the commit message, and rebased]
Signed-off-by: Elijah Newren <newren@gmail.com>
pull/217/head
Stefan Lietzau 4 years ago committed by Elijah Newren
parent 7b09784d7b
commit c9a9dcc886

@ -320,8 +320,8 @@ class MailmapInfo(object):
for old, new in self.changes.items():
old_name, old_email = old
new_name, new_email = new
if (email == old_email or not old_email) and (
name == old_name or not old_name):
if (not old_email or email.lower() == old_email.lower()) and (
name == old_name or not old_name):
return (new_name or name, new_email or email)
return (name, email)

Loading…
Cancel
Save