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

Re: [PATCH 1/3] Add git-send-email-script - tool to send emails from git-format-patch-script

From
Junio C Hamano <junkio@cox.net>
Date
Aug 1, 2005, 00:40 UTC
Message-ID
<7vk6j6a3rh.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050731235242.GH32263@mythryan2.michonline.com>
Ryan Anderson <ryan@michonline.com> writes:
Show 5 quoted lines
> If I hope that nobody has done something like:
> 	GIT_AUTHOR="Ryan <> Anderson"
> 	GIT_AUTHOR_EMAIL="ryan@michonline.com"
>
> I get more confusing results.

The function git_author_info() would remove <> from the above GIT_AUTHOR_* environment values by calling ident.c:copy(), so I think you would get more-or-less what you _should_ expect without getting confused.

    $ GIT_AUTHOR_NAME="Ryan <> Anderson" \
      GIT_AUTHOR_EMAIL="ryan@michonline.com" git-var -l
    GIT_COMMITTER_IDENT=Junio C Hamano <junkio@cox.net> 1122855849 -0700
    GIT_AUTHOR_IDENT=Ryan  Anderson <ryan@michonline.com> 1122855849 -0700
Show 5 quoted lines
>> Is this the culprit that produced this mechanical-looking line?
>> 
>>     To: junkio@cox.net,git@vger.kernel.org
>
> No, that line was exactly what I put into the readline entry.

I was mostly talking about Email::Valid seeming to be stripping out the display-name[*] part and keeping only addr-spec[*] part, like this:

    $ cat j.perl
    #!/usr/bin/perl
    use Email::Valid;
    for ('Junio C Hamano <junkio@cox.net>',
         'Ryan Anderson <ryan@michonline.com>') {
        print $_, " => ", lc(Email::Valid->address($_)), "\n";
    }
    $ perl j.perl
    Junio C Hamano <junkio@cox.net> => junkio@cox.net
    Ryan Anderson <ryan@michonline.com> => ryan@michonline.com

Also, I wonder if running lc() to downcase the local-part[*] is safe/allowed/correct; domain[*] part is case insensitive and should be OK to downcase, though.

> ..., because of the way I pull in all the relevant emails
> from various places.  So I really needed a way to cull the duplicates.
> ...  I could do soemthing like this, instead, I suppose:

I understand your needs, and you can make it a "sub filter_dups", which I think would make things a lot more pleasant to read.

[Footnote]
Terms marked [*] are from RFC2822, section 3.4.
Previous: Ryan AndersonNext: Matthias Urlichs
Message 7 of 16 in “Add git-send-email-script - tool to send emails from git-format-patch-script”
  1. 1/3 Add git-send-email-script - tool to send emails from git-format-patch-scriptRyan Anderson, Jul 31, 2005
  2. Ryan AndersonJul 31, 2005
  3. Matthias UrlichsJul 31, 2005
  4. Junio C HamanoJul 31, 2005
  5. Junio C HamanoJul 31, 2005
  6. Ryan AndersonJul 31, 2005
  7. Junio C HamanoAug 1, 2005
  8. Matthias UrlichsAug 1, 2005
  9. Ryan AndersonAug 3, 2005
  10. Matthias UrlichsAug 3, 2005
  11. Johannes SchindelinJul 31, 2005
  12. Ryan AndersonJul 31, 2005
  13. Sergey VlasovJul 31, 2005
  14. Noel MaddyAug 2, 2005
  15. Junio C HamanoAug 2, 2005
  16. Noel MaddyAug 2, 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.