Commit 9e46f6761891dbf05b733baae48e8c7161a213b5

Nicolas Viennot 2013-04-18T00:55:20

Return error for empty name/email

1
2
3
4
5
6
7
8
9
10
11
12
13
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;