Do not allow empty name or email.
Instead of silently allowing to create a bogus commit that lacks information by mistake, complain loudly and die. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 7, 2006 at 13:19 UTC
dfdd309e574df2da93f48d9cf4e83d53233dbe14
1 file changed
+5
ident.c
+5
@@ -167,6 +167,11 @@ static const char *get_ident(const char *name, const char *email,
167
name = git_default_name;
168
if (!email)
169
email = git_default_email;
170
+
171
+ if (!*name || !*email)
172
+ die("empty ident %s <%s> not allowed",
173
+ name, email);
174
+
175
strcpy(date, git_default_date);
176
if (date_str)
177
parse_date(date_str, date, sizeof(date));