Commits

Anonymous committed 4d44cb1 Merge

Merge branch 'jc/empty-commit'

* jc/empty-commit:
t6000: fix a careless test library add-on.
Do not allow empty name or email.

  • Participants
  • Parent commits cf7bb58, 47e013f

Comments (0)

Files changed (2)

 		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));

File t/t6000lib.sh

 
 	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()