summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-10 15:14:55 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-10 15:14:55 (GMT)
commit4d44cb195aca5b744fd9f149af513637ff343a67 (patch)
treeeacf7fcf57466599eda4074a3e828654abb7e2bc
parentcf7bb589af739563c90dc32b4901bea73aaaa9d0 (diff)
parent47e013f9207a235a87390ee8ad03c8a7406f4147 (diff)
downloadgit-4d44cb195aca5b744fd9f149af513637ff343a67.zip
git-4d44cb195aca5b744fd9f149af513637ff343a67.tar.gz
git-4d44cb195aca5b744fd9f149af513637ff343a67.tar.bz2
Merge branch 'jc/empty-commit'
* jc/empty-commit: t6000: fix a careless test library add-on. Do not allow empty name or email.
-rw-r--r--ident.c5
-rwxr-xr-xt/t6000lib.sh7
2 files changed, 11 insertions, 1 deletions
diff --git a/ident.c b/ident.c
index 0461b8b..23b8cfc 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));
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index 01f796e..c6752af 100755
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
@@ -51,7 +51,12 @@ as_author()
export GIT_AUTHOR_EMAIL="$_author"
"$@"
- export GIT_AUTHOR_EMAIL="$_save"
+ if test -z "$_save"
+ then
+ unset GIT_AUTHOR_EMAIL
+ else
+ export GIT_AUTHOR_EMAIL="$_save"
+ fi
}
commit_date()