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

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

From
Junio C Hamano <junkio@cox.net>
Date
Sep 20, 2005, 07:10 UTC
Message-ID
<7v8xxs5i5x.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050919212113.GB8862@puritan.pnetwork>
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.
Previous: Nikolai WeibullNext: Junio C Hamano
Message 18 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.