Split authorship lines from the right instead of from the left
authorNicolas Dandrimont <olasd@softwareheritage.org>
Fri, 19 Oct 2018 15:44:12 +0000 (17:44 +0200)
committerNicolas Dandrimont <olasd@softwareheritage.org>
Fri, 19 Oct 2018 15:50:56 +0000 (17:50 +0200)
commiteac04520d21f7ff11e68673eeb0538ec4c4a030e
tree7ca206abc42dac5a5c8506c0bdea27f689616747
parent927e7599d45ee01b5f572a60c56482115955b6c1
Split authorship lines from the right instead of from the left

Git authorship lines are in the form 'author Name <em@i.l> timestamp timezone'.
Some clients mess up the 'Name <em@i.l>' part badly, for instance by setting two
email addresses. Splitting identity and timestamp by looking at the '> ' part
from the right instead of the left helps parse some of those messed up commits.

Such commits still fail the check() method (and they raise a warning in git fsck
upstream as well), but we can at least work with them.

(This edge case brought to you by https://forge.softwareheritage.org/T1280)
dulwich/objects.py
dulwich/tests/test_objects.py