Commit 2b63dbfbc12746465f6b37aa2b050cdc77679657

Vicent Martí 2013-04-18T06:01:41

Merge pull request #1482 from nviennot/error-name-email 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;