git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Cogito] Various bugs

From
Junio C Hamano <junkio@cox.net>
Date
Feb 7, 2006, 20:49 UTC
Message-ID
<7v8xsmvqqp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0602070751410.3854@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 6 quoted lines
> 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));
Previous: Linus TorvaldsNext: Jonas Fonseca
Message 9 of 10 in “[Cogito] Various bugs”
  1. Jonas FonsecaJan 31, 2006
  2. Petr BaudisFeb 7, 2006
  3. Junio C HamanoFeb 7, 2006
  4. Petr BaudisFeb 7, 2006
  5. Junio C HamanoFeb 7, 2006
  6. Linus TorvaldsFeb 7, 2006
  7. Petr BaudisFeb 7, 2006
  8. Linus TorvaldsFeb 7, 2006
  9. Junio C HamanoFeb 7, 2006
  10. Jonas FonsecaFeb 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.