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

From: Junio C Hamano <junkio@cox.net>
Date: 2005-09-20 17:10:02
Nikolai Weibull <mailing-lists.git@rawuncut.elitemail.org> writes:

> Perhaps something like the following patch will do?,
>         nikolai

Thanks for the patch.  Some nits and requests.

(1) Proper commit log message here, with your Signed-off-by line.

> +	if (!name && !email && getenv("EMAIL")) {
> +		i = copy(buffer, sizeof(buffer), 0, getenv("EMAIL"));
> +		i = add_raw(buffer, sizeof(buffer), i, " ");

(2) Perhaps have `#define IDENT_ENVIRONMENT "EMAIL"' in cache.h
    and use it, like we do for other environment variables.

(3) Probably you need to validate what is in $EMAIL before
    trusting it, so that we can guard ourselves from EMAIL in a
    format that is suitable for other applications but not for
    us?  If you find that the value does not look good, just
    refuse it with an error message to set more specific
    GIT_{AUTHOR,COMMITTER}_* environment variables.

    Unlike GIT_* environment variables, EMAIL is a convention we
    did not invent ourselves.  We cannot expect it to always be
    formatted to our liking, and more importantly, we should not
    demand the user to set it to the way we like -- the other
    application the user originally set EMAIL for might not like
    what we want.


-
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 Tue Sep 20 17:10:49 2005

This archive was generated by hypermail 2.1.8 : 2005-09-20 17:10:52 EST