1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 19:56:10 +02:00

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>
This commit is contained in:
Junio C Hamano 2006-02-07 13:19:10 -08:00
parent d19e06fa8f
commit dfdd309e57

View File

@ -167,6 +167,11 @@ static const char *get_ident(const char *name, const char *email,
name = git_default_name;
if (!email)
email = git_default_email;
if (!*name || !*email)
die("empty ident %s <%s> not allowed",
name, email);
strcpy(date, git_default_date);
if (date_str)
parse_date(date_str, date, sizeof(date));