Merge pull request #1482 from nviennot/error-name-email Return error for empty name/email
diff --git a/src/signature.c b/src/signature.c
index 164e8eb..649dbcd 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -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;