Skip to content

Commit f62eb75

Browse files
committed
fixed bug in mailmap check
1 parent 0705e8b commit f62eb75

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

git2net/extraction.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,10 @@ def _check_mailmap(name, email, git_repo):
10611061
- *str* – corresponding username from mailmap
10621062
- *str* – corresponding email from mailmap
10631063
"""
1064-
test_str = '{} <{}>'.format(name, email)
1064+
if name.strip().startswith('--'):
1065+
test_str = '<{}>'.format(email)
1066+
else:
1067+
test_str = '{} <{}>'.format(name, email)
10651068
out_str = git.Git(str(git_repo.path)).check_mailmap(test_str)
10661069

10671070
matches = re.findall("^(.*) <(.*)>$", out_str)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = git2net
3-
version = 1.6.1
3+
version = 1.6.2
44
author = Christoph Gote
55
author_email = cgote@ethz.ch
66
license = AGPL-3.0+

0 commit comments

Comments
 (0)