From: Junio C Hamano Date: Tue, 7 Feb 2006 21:19:10 +0000 (-0800) Subject: Do not allow empty name or email. X-Git-Tag: v1.2.0~26^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dfdd309e574df2da93f48d9cf4e83d53233dbe14;p=git.git 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 --- diff --git a/ident.c b/ident.c index 0461b8b2..23b8cfc6 100644 --- a/ident.c +++ b/ident.c @@ -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));