Merge branch 'jc/empty-commit'
* jc/empty-commit: t6000: fix a careless test library add-on. Do not allow empty name or email.
This commit is contained in:
5
ident.c
5
ident.c
@ -167,6 +167,11 @@ static const char *get_ident(const char *name, const char *email,
|
|||||||
name = git_default_name;
|
name = git_default_name;
|
||||||
if (!email)
|
if (!email)
|
||||||
email = git_default_email;
|
email = git_default_email;
|
||||||
|
|
||||||
|
if (!*name || !*email)
|
||||||
|
die("empty ident %s <%s> not allowed",
|
||||||
|
name, email);
|
||||||
|
|
||||||
strcpy(date, git_default_date);
|
strcpy(date, git_default_date);
|
||||||
if (date_str)
|
if (date_str)
|
||||||
parse_date(date_str, date, sizeof(date));
|
parse_date(date_str, date, sizeof(date));
|
||||||
|
@ -51,7 +51,12 @@ as_author()
|
|||||||
|
|
||||||
export GIT_AUTHOR_EMAIL="$_author"
|
export GIT_AUTHOR_EMAIL="$_author"
|
||||||
"$@"
|
"$@"
|
||||||
|
if test -z "$_save"
|
||||||
|
then
|
||||||
|
unset GIT_AUTHOR_EMAIL
|
||||||
|
else
|
||||||
export GIT_AUTHOR_EMAIL="$_save"
|
export GIT_AUTHOR_EMAIL="$_save"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
commit_date()
|
commit_date()
|
||||||
|
Reference in New Issue
Block a user