mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
sync: Fix split call on malformed email addresses
If an email address in a commit object contains a space, like a few malformed ones on the Linux kernel, we still want to split only on the first space. Unfortunately my brain was too damaged by Perl and originally wrote the split asking for 2 results; in Python split's argument is how many splits to perform. Here we want only 1 split, to break apart the commit identity from the email address on the same line. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
9bb1816bdc
commit
aa4982e4c9
@ -728,7 +728,7 @@ class Project(object):
|
|||||||
last_mine = None
|
last_mine = None
|
||||||
cnt_mine = 0
|
cnt_mine = 0
|
||||||
for commit in local_changes:
|
for commit in local_changes:
|
||||||
commit_id, committer_email = commit.split(' ', 2)
|
commit_id, committer_email = commit.split(' ', 1)
|
||||||
if committer_email == self.UserEmail:
|
if committer_email == self.UserEmail:
|
||||||
last_mine = commit_id
|
last_mine = commit_id
|
||||||
cnt_mine += 1
|
cnt_mine += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user