Correct mailmapping of empty email addresses

`not old_email` doesn't distinguish between `None` and an empty string,
causing old emails specified as `<>` to apply to every single commit.

Signed-off-by: Riley Iverson <blepabyte@proton.me>
pull/343/head
Riley Iverson 2 years ago
parent fff5f43a15
commit 91f16fd5ed
No known key found for this signature in database
GPG Key ID: 253E63DC78D87154

@ -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 (not old_email or email.lower() == old_email.lower()) and (
name == old_name or not old_name):
if (old_email is None 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