=== modified file 'a/breezy/git/mapping.py' --- a/breezy/git/mapping.py +++ b/breezy/git/mapping.py @@ -121,6 +121,8 @@ def fix_person_identifier(text): if b"<" not in text and b">" not in text: username = text email = text + elif b">" not in text: + return text + b">" else: if text.rindex(b">") < text.rindex(b"<"): raise ValueError(text) --- a/breezy/git/tests/test_mapping.py +++ b/breezy/git/tests/test_mapping.py @@ -443,9 +443,14 @@ class FixPersonIdentifierTests(tests.Tes fix_person_identifier(b"bar@blah.nl")) def test_fix(self): - self.assertEqual(b"person ", - fix_person_identifier(b"somebody >")) - self.assertEqual(b"person ", - fix_person_identifier(b"person")) + self.assertEqual( + b"person ", + fix_person_identifier(b"somebody >")) + self.assertEqual( + b"person ", + fix_person_identifier(b"person")) + self.assertEqual( + b'Rohan Garg ', + fix_person_identifier(b'Rohan Garg bar@blah.nl<")