Re: [Cogito] Various bugs

From: Junio C Hamano <junkio@cox.net>
Date: 2006-02-08 07:49:34
Linus Torvalds <torvalds@osdl.org> writes:

> An empty GIT_AUTHOR_NAME should _not_ mean that we use the default name 
> (which is usually the committer), because rather than meaning "default", 
> it most likely means "buggy import script". 
>
> I'd rather have an email import of mine say that it cannot commit, than 
> have it put "Linus Torvalds" in the author line (and some random email).

I am inclined to agree.  Something like this?

This would also make 'git-var GIT_COMMITTER_IDENT' to barf,
which I think is a good thing.

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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Feb 08 07:50:26 2006

This archive was generated by hypermail 2.1.8 : 2006-02-08 07:50:36 EST