diff --git a/git_of_theseus/analyze.py b/git_of_theseus/analyze.py index 303cbb0..8492070 100644 --- a/git_of_theseus/analyze.py +++ b/git_of_theseus/analyze.py @@ -546,7 +546,7 @@ def dump_json(output_fn, key_type, label_fmt=lambda x: x): @functools.lru_cache(maxsize=None) def get_mailmap_author_name_email(repo, author_name, author_email): - pre_mailmap_author_email = f"{author_name} <{author_email}>" + pre_mailmap_author_email = f"{author_name.lstrip('-') if author_name else author_email} <{author_email}>" mail_mapped_author_email: str = repo.git.check_mailmap(pre_mailmap_author_email) mailmap_name, mailmap_email = mail_mapped_author_email[:-1].split(" <", maxsplit=1) return mailmap_name, mailmap_email