commit: Allow spaces inside email addresses

Core Git doesn't care when people use spaces in the email address, even
though this kind of foolery receives the capital punishment in several
states of the USA.

We must obey.
This commit is contained in:
Vicent Marti 2011-06-28 19:52:41 +02:00
parent ccd59372d4
commit e053c911cf

View File

@ -210,7 +210,7 @@ int git_signature__parse(git_signature *sig, const char **buffer_out,
return git__throw(GIT_EOBJCORRUPTED, "Failed to parse signature. Ended unexpectedly"); return git__throw(GIT_EOBJCORRUPTED, "Failed to parse signature. Ended unexpectedly");
/* verify email */ /* verify email */
if (strpbrk(sig->email, "><\n ") != NULL) if (strpbrk(sig->email, "><\n") != NULL)
return git__throw(GIT_EOBJCORRUPTED, "Failed to parse signature. Malformed e-mail"); return git__throw(GIT_EOBJCORRUPTED, "Failed to parse signature. Malformed e-mail");
if (git__strtol32(&time, buffer, &buffer, 10) < GIT_SUCCESS) if (git__strtol32(&time, buffer, &buffer, 10) < GIT_SUCCESS)