Skip to content

Commit 91f16fd

Browse files
author
Riley Iverson
committed
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 <[email protected]>
1 parent fff5f43 commit 91f16fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-filter-repo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ class MailmapInfo(object):
320320
for old, new in self.changes.items():
321321
old_name, old_email = old
322322
new_name, new_email = new
323-
if (not old_email or email.lower() == old_email.lower()) and (
324-
name == old_name or not old_name):
323+
if (old_email is None or email.lower() == old_email.lower()) and (
324+
name == old_name or not old_name):
325325
return (new_name or name, new_email or email)
326326
return (name, email)
327327

0 commit comments

Comments
 (0)