Return error for empty name/email

This commit is contained in:
Nicolas Viennot 2013-04-18 00:55:20 -04:00
parent 53cb87575d
commit 9e46f67618

View File

@ -69,7 +69,7 @@ int git_signature_new(git_signature **sig_out, const char *name, const char *ema
if (p->name == NULL || p->email == NULL ||
p->name[0] == '\0' || p->email[0] == '\0') {
git_signature_free(p);
return -1;
return signature_error("Empty name or email");
}
p->when.time = time;