提交 dfdd309e 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <junkio@cox.net>
上级 d19e06fa
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册