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

Re: What shall we do with the GECOS field again?

From
NWNikolai Weibull <mailing-lists.git@rawuncut.elitemail.org>
Date
Sep 19, 2005, 21:21 UTC
Message-ID
<20050919212113.GB8862@puritan.pnetwork>
In-Reply-To
<20050919163219.GA8862@puritan.pnetwork>
Nikolai Weibull wrote:
Show 10 quoted lines
> If we stop using GECOS, then can we please start using $EMAIL (or
> perhaps use it regardless of whether we use GECOS or not)?  A lot of
> applications seem to look for $EMAIL and I think that it's universal
> enough for git to use it as well.  To me it seems that both
> GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and
> GIT_COMMITTER_EMAIL can use it, as I set $EMAIL as
> 
> EMAIL="Nikolai Weibull <something@something.something>"
> 
> Perhaps I should provide a patch instead of just putting out requests?,
Perhaps something like the following patch will do?,
        nikolai
---
diff --git a/ident.c b/ident.c
--- a/ident.c
+++ b/ident.c
@@ -127,18 +127,22 @@ char *get_ident(const char *name, const 
 	char date[50];
 	int i;
 
-	if (!name)
-		name = real_name;
-	if (!email)
-		email = real_email;
+	if (!name && !email && getenv("EMAIL")) {
+		i = copy(buffer, sizeof(buffer), 0, getenv("EMAIL"));
+		i = add_raw(buffer, sizeof(buffer), i, " ");
+	} else {
+		if (!name)
+			name = real_name;
+		if (!email)
+			email = real_email;
+		i = copy(buffer, sizeof(buffer), 0, name);
+		i = add_raw(buffer, sizeof(buffer), i, " <");
+		i = copy(buffer, sizeof(buffer), i, email);
+		i = add_raw(buffer, sizeof(buffer), i, "> ");
+	}
 	strcpy(date, real_date);
 	if (date_str)
 		parse_date(date_str, date, sizeof(date));
-
-	i = copy(buffer, sizeof(buffer), 0, name);
-	i = add_raw(buffer, sizeof(buffer), i, " <");
-	i = copy(buffer, sizeof(buffer), i, email);
-	i = add_raw(buffer, sizeof(buffer), i, "> ");
 	i = copy(buffer, sizeof(buffer), i, date);
 	if (i >= sizeof(buffer))
 		die("Impossibly long personal identifier");
-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
Previous: Nikolai WeibullNext: Junio C Hamano
Message 17 of 20 in “What shall we do with the GECOS field again?”
  1. Petr BaudisSep 19, 2005
  2. Kevin O'RiordanSep 19, 2005
  3. Matthias UrlichsSep 19, 2005
  4. A Large Angry SCMSep 19, 2005
  5. Matthias UrlichsSep 19, 2005
  6. A Large Angry SCMSep 19, 2005
  7. Petr BaudisSep 19, 2005
  8. Junio C HamanoSep 19, 2005
  9. Petr BaudisSep 19, 2005
  10. Linus TorvaldsSep 19, 2005
  11. Junio C HamanoSep 19, 2005
  12. Linus TorvaldsSep 19, 2005
  13. Ryan AndersonSep 20, 2005
  14. Linus TorvaldsSep 20, 2005
  15. Junio C HamanoSep 20, 2005
  16. Nikolai WeibullSep 19, 2005
  17. Nikolai WeibullSep 19, 2005
  18. Junio C HamanoSep 20, 2005
  19. Junio C HamanoSep 20, 2005
  20. Nikolai WeibullSep 20, 2005

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.