git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolai Weibull <mailing-lists.git@rawuncut.elitemail.org>
To: git@vger.kernel.org
Subject: Re: What shall we do with the GECOS field again?
Date: Mon, 19 Sep 2005 23:21:13 +0200	[thread overview]
Message-ID: <20050919212113.GB8862@puritan.pnetwork> (raw)
In-Reply-To: <20050919163219.GA8862@puritan.pnetwork>

Nikolai Weibull wrote:

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

  reply	other threads:[~2005-09-19 21:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-19 13:48 What shall we do with the GECOS field again? Petr Baudis
2005-09-19 14:11 ` Kevin O'Riordan
2005-09-19 14:34   ` Matthias Urlichs
2005-09-19 14:30 ` A Large Angry SCM
2005-09-19 14:47   ` Matthias Urlichs
2005-09-19 16:16     ` A Large Angry SCM
2005-09-19 16:34       ` Petr Baudis
2005-09-19 16:06 ` Junio C Hamano
2005-09-19 16:16   ` Petr Baudis
2005-09-19 16:32   ` Linus Torvalds
2005-09-19 16:49     ` Junio C Hamano
2005-09-19 16:59       ` Linus Torvalds
2005-09-20  4:02         ` Ryan Anderson
2005-09-20  4:13           ` Linus Torvalds
2005-09-20  3:12       ` Horst von Brand
2005-09-20  6:30       ` Junio C Hamano
2005-09-19 16:32 ` Nikolai Weibull
2005-09-19 21:21   ` Nikolai Weibull [this message]
2005-09-20  7:10     ` Junio C Hamano
2005-09-20  1:53   ` Junio C Hamano
2005-09-20 10:31     ` Nikolai Weibull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050919212113.GB8862@puritan.pnetwork \
    --to=mailing-lists.git@rawuncut.elitemail.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).