{"thread":{"id":"34191","subject":"[PATCH] send-email: allow use of basic email list in --cc --to and --bcc","startedAt":"2013-06-18T09:51:19Z","lastAt":"2013-06-18T16:26:51Z","messageCount":13,"participants":["jorge-juan.garcia-garcia@ensimag.imag.fr","Ramkumar Ramachandra","Mathieu Liénard--Mayor","benoît person","Matthieu Moy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"221171","messageId":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","threadId":"34191","inReplyTo":null,"subject":"[PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"","fromEmail":"jorge-juan.garcia-garcia@ensimag.imag.fr","sentAt":"2013-06-18T09:51:19Z","receivedAt":"2013-06-18T09:51:19Z","isPatch":true,"sender":{"key":"jorge-juan.garcia-garcia@ensimag.imag.fr","avatar":null},"body":"From: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>\n\nMake it so that we can use a list of email in flags\ninstead of having to use one flag per email address.\n\nThe format of email list handled is pretty basic for now:\n\t$ git send-email --to='Foo <foo@example.com>, bar@example.com'\nWe thought it would be nice to have a \"first-step\" version which works\nbefore handling more complex ones such as:\n\t$ git send-email --to='Foo, Bar <foobar@example.com>'\n\nSigned-off-by: Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>\nSigned-off-by: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>\nSigned-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>\n---\n\nChanges in the patch:\n -Update documentation\n -Removal of no-longer needed user input verification\n -New function that splits email list into seperate email addresses\n -New test to make sure it behaves the way intended\n\n Documentation/git-send-email.txt |   21 +++++++++++++++------\n git-send-email.perl              |   38 ++++++++++++++++++++++++--------------\n t/t9001-send-email.sh            |   37 ++++++++++++++++++++++++++++++++++++-\n 3 files changed, 75 insertions(+), 21 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 40a9a9a..e3444cf 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -50,16 +50,22 @@ Composing\n \t'sendemail.multiedit'.\n \n --bcc=<address>::\n+--bcc=\"[<address>,...]\"::\n \tSpecify a \"Bcc:\" value for each email. Default is the value of\n \t'sendemail.bcc'.\n-+\n-The --bcc option must be repeated for each user you want on the bcc list.\n+\tThe format supported for email list is the following:\n+\t\"Foo <foo@example.com>, bar@example.com\".\n+\tPlease notice that the email list does not handle commas in\n+\temail names such as \"Foo, Bar <foobar@example.com>\".\n \n --cc=<address>::\n+--cc=\"[<address>,...]\"::\n \tSpecify a starting \"Cc:\" value for each email.\n \tDefault is the value of 'sendemail.cc'.\n-+\n-The --cc option must be repeated for each user you want on the cc list.\n+\tThe format supported for email list is the following:\n+\t\"Foo <foo@example.com>, bar@example.com\".\n+\tPlease notice that the email list does not handle commas in\n+\temail names such as \"Foo, Bar <foobar@example.com>\".\n \n --compose::\n \tInvoke a text editor (see GIT_EDITOR in linkgit:git-var[1])\n@@ -111,12 +117,15 @@ is not set, this will be prompted for.\n \tis not set, this will be prompted for.\n \n --to=<address>::\n+--to=\"[<address>,...]\"::\n \tSpecify the primary recipient of the emails generated. Generally, this\n \twill be the upstream maintainer of the project involved. Default is the\n \tvalue of the 'sendemail.to' configuration value; if that is unspecified,\n \tand --to-cmd is not specified, this will be prompted for.\n-+\n-The --to option must be repeated for each user you want on the to list.\n+\tThe format supported for email list is the following:\n+\t\"Foo <foo@example.com>, bar@example.com\".\n+\tPlease notice that the email list does not handle commas in\n+\temail names such as \"Foo, Bar <foobar@example.com>\".\n \n --8bit-encoding=<encoding>::\n \tWhen encountering a non-ASCII message or subject that does not\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 671762b..d7e4887 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -426,20 +426,6 @@ my ($repoauthor, $repocommitter);\n ($repoauthor) = Git::ident_person(@repo, 'author');\n ($repocommitter) = Git::ident_person(@repo, 'committer');\n \n-# Verify the user input\n-\n-foreach my $entry (@initial_to) {\n-\tdie \"Comma in --to entry: $entry'\\n\" unless $entry !~ m/,/;\n-}\n-\n-foreach my $entry (@initial_cc) {\n-\tdie \"Comma in --cc entry: $entry'\\n\" unless $entry !~ m/,/;\n-}\n-\n-foreach my $entry (@bcclist) {\n-\tdie \"Comma in --bcclist entry: $entry'\\n\" unless $entry !~ m/,/;\n-}\n-\n sub parse_address_line {\n \tif ($have_mail_address) {\n \t\treturn map { $_->format } Mail::Address->parse($_[0]);\n@@ -1079,6 +1065,27 @@ sub smtp_auth_maybe {\n \treturn $auth;\n }\n \n+sub split_email_list {\n+    my(@list) = @_;\n+    my @tmp;\n+    my @emails;\n+\tfor (my $i = 0; $i <= $#list; $i++) {\n+\t    if ($list[$i] =~ /,/) {\n+\t\t@emails = split(/,/, $list[$i]);\n+\t    } else {\n+\t\t@emails = $list[$i];\n+\t    }\n+\t    # Removal of unwanted spaces\n+\t    for (my $j = 0; $j <= $#emails; $j++) {\n+\t\t$emails[$j] =~ s/^\\s+//;\n+\t\t$emails[$j] =~ s/\\s+$//;\n+\t    }\n+\t    @tmp = (@tmp, @emails);\n+\t}\n+    return(@tmp);\n+}\n+\n+\n # Returns 1 if the message was sent, and 0 otherwise.\n # In actuality, the whole program dies when there\n # is an error sending a message.\n@@ -1089,6 +1096,9 @@ sub send_message {\n \t\t      not grep { $cc eq $_ || $_ =~ /<\\Q${cc}\\E>$/ } @recipients\n \t\t    }\n \t       @cc);\n+\t@cc = split_email_list(@cc);\n+\t@bcclist = split_email_list(@bcclist);\n+\t@recipients = split_email_list(@recipients);\n \tmy $to = join (\",\\n\\t\", @recipients);\n \t@recipients = unique_email_list(@recipients,@cc,@bcclist);\n \t@recipients = (map { extract_valid_address_or_die($_) } @recipients);\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 9f46f22..87641bc 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1349,4 +1349,39 @@ test_expect_success $PREREQ 'sendemail.aliasfile=~/.mailrc' '\n \tgrep \"^!someone@example\\.org!$\" commandline1\n '\n \n-test_done\n+test_expect_success $PREREQ 'setup expected-list' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--suppress-cc=sob \\\n+\t\t--from=\"Example <from@example.com>\" \\\n+\t\t--to=\"to1@example.com\" --to=\"to2@example.com\" \\\n+\t\t--to=\"to3@example.com\" --cc=\"cc0@example.com\" \\\n+\t\t--cc=\"Cc 1 <cc1@example.com>\" --cc=\"Cc 2 <cc2@example.com>\" \\\n+\t\t--bcc=\"bcc1@example.com\" --bcc=\"bcc2@example.com\" \\\n+\t\t-1 >output\n+\tsed\t-e \"s/^\\(\\/tmp\\/\\).*/\\1patch/\" \\\n+\t\t-e \"s/^\\(Date:\\).*/\\1 DATE-STRING/\" \\\n+\t\t-e \"s/^\\(Message-Id:\\).*/\\1 MESSAGE-ID-STRING/\" \\\n+\t\t-e \"s/^\\(X-Mailer:\\).*/\\1 X-MAILER-STRING/\" \\\n+\t\t<output >expected-list\n+'\n+\n+test_expect_success $PREREQ 'use email list in --cc --to and --bcc' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--suppress-cc=sob \\\n+\t\t--from=\"Example <from@example.com>\" \\\n+\t\t--to=\"to1@example.com, to2@example.com,to3@example.com\" \\\n+\t\t--cc=\"cc0@example.com\" \\\n+\t\t--cc=\"Cc 1 <cc1@example.com>, Cc 2 <cc2@example.com>\" \\\n+\t\t--bcc=\"bcc1@example.com, bcc2@example.com\" \\\n+\t\t-1 >output\n+\tsed\t-e \"s/^\\(\\/tmp\\/\\).*/\\1patch/\" \\\n+\t\t-e \"s/^\\(Date:\\).*/\\1 DATE-STRING/\" \\\n+\t\t-e \"s/^\\(Message-Id:\\).*/\\1 MESSAGE-ID-STRING/\" \\\n+\t\t-e \"s/^\\(X-Mailer:\\).*/\\1 X-MAILER-STRING/\" \\\n+\t\t<output >actual-list &&\n+\ttest_cmp expected-list actual-list\n+'\n+\n+test_done\n\\ No newline at end of file\n-- \n1.7.8\n"},{"id":"221175","messageId":"CALkWK0mTWC87Z1E3eZ_gzjXrmtFb9ir6aY7mXVBfe9oHHXCHcQ@mail.gmail.com","threadId":"34191","inReplyTo":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T10:12:31Z","receivedAt":"2013-06-18T10:12:31Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jorge-Juan.Garcia-Garcia@ensimag.imag.fr wrote:\n> The format of email list handled is pretty basic for now:\n>         $ git send-email --to='Foo <foo@example.com>, bar@example.com'\n> We thought it would be nice to have a \"first-step\" version which works\n> before handling more complex ones such as:\n>         $ git send-email --to='Foo, Bar <foobar@example.com>'\n\nIs this a regression?  I can't send emails to a recipient whose name\ncontains a comma?\n"},{"id":"221176","messageId":"f1cbf11015d6ebd9640b2b59ab4631e1@ensibm.imag.fr","threadId":"34191","inReplyTo":"CALkWK0mTWC87Z1E3eZ_gzjXrmtFb9ir6aY7mXVBfe9oHHXCHcQ@mail.gmail.com","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Mathieu Liénard--Mayor","fromEmail":"mathieu.lienard--mayor@ensimag.fr","sentAt":"2013-06-18T10:15:11Z","receivedAt":"2013-06-18T10:15:11Z","isPatch":true,"sender":{"key":"mathieu.lienard--mayor@ensimag.fr","avatar":null},"body":"Le 2013-06-18 12:12, Ramkumar Ramachandra a écrit :\n> Jorge-Juan.Garcia-Garcia@ensimag.imag.fr wrote:\n>> The format of email list handled is pretty basic for now:\n>>         $ git send-email --to='Foo <foo@example.com>, \n>> bar@example.com'\n>> We thought it would be nice to have a \"first-step\" version which \n>> works\n>> before handling more complex ones such as:\n>>         $ git send-email --to='Foo, Bar <foobar@example.com>'\n>\n> Is this a regression?  I can't send emails to a recipient whose name\n> contains a comma?\nIt is not. Previously the input would be considered incorrect:\n\n-# Verify the user input\n-\n-foreach my $entry (@initial_to) {\n-\tdie \"Comma in --to entry: $entry'\\n\" unless $entry !~ m/,/;\n-}\n-- \nMathieu Liénard--Mayor,\n2nd year at Grenoble INP - ENSIMAG\n(+33)6 80 56 30 02\n"},{"id":"221177","messageId":"CALkWK0=2t7mv9t1xLOG8X5HMRhcamf3LjC+Qny1cX5mJGJdE_A@mail.gmail.com","threadId":"34191","inReplyTo":"f1cbf11015d6ebd9640b2b59ab4631e1@ensibm.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T10:21:36Z","receivedAt":"2013-06-18T10:21:36Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Mathieu Liénard--Mayor wrote:\n>> Is this a regression?  I can't send emails to a recipient whose name\n>> contains a comma?\n>\n> It is not. Previously the input would be considered incorrect:\n\nRight.  It dies with\n\n  Comma in --to entry: ...\n\nThis artificial limitation is imposed by 79ee555b (Check and document\nthe options to prevent mistakes, 2006-06-21).\n\nPerhaps include this information in the commit message?\n"},{"id":"221178","messageId":"CAETqRCjCf0HKfAsgcWPnv81OY07T0JZdXVGGr-DgLsP3miWUvQ@mail.gmail.com","threadId":"34191","inReplyTo":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"benoît person","fromEmail":"benoit.person@gmail.com","sentAt":"2013-06-18T10:26:18Z","receivedAt":"2013-06-18T10:26:18Z","isPatch":true,"sender":{"key":"benoit.person@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1145270?v=4"},"body":"> +sub split_email_list {\n> +    my(@list) = @_;\n> +    my @tmp;\n> +    my @emails;\n> +       for (my $i = 0; $i <= $#list; $i++) {\n> +           if ($list[$i] =~ /,/) {\n> +               @emails = split(/,/, $list[$i]);\n> +           } else {\n> +               @emails = $list[$i];\n> +           }\n> +           # Removal of unwanted spaces\n> +           for (my $j = 0; $j <= $#emails; $j++) {\n> +               $emails[$j] =~ s/^\\s+//;\n> +               $emails[$j] =~ s/\\s+$//;\n> +           }\n> +           @tmp = (@tmp, @emails);\n> +       }\n> +    return(@tmp);\n> +}\nWhy two regex ? You could do something like :\n$emails[$j] =~ s/^\\s+|\\s+$//g;\nto remove leading and trailing whitespaces at the same time.\n\nI think it's better to use the builin 'push' function to concatenate\nyour two arrays:\npush(@tmp, @emails);\n\nBenoit Person\n"},{"id":"221180","messageId":"CALkWK0=vytkxM3yzVaed+i3Q+RpvH=tSLndf=vUmiYC=sn=nFg@mail.gmail.com","threadId":"34191","inReplyTo":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T10:47:44Z","receivedAt":"2013-06-18T10:47:44Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jorge-Juan.Garcia-Garcia@ensimag.imag.fr wrote:\n> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n> index 9f46f22..87641bc 100755\n> --- a/t/t9001-send-email.sh\n> +++ b/t/t9001-send-email.sh\n> @@ -1349,4 +1349,39 @@ test_expect_success $PREREQ 'sendemail.aliasfile=~/.mailrc' '\n>         grep \"^!someone@example\\.org!$\" commandline1\n>  '\n>\n> -test_done\n> +test_expect_success $PREREQ 'setup expected-list' '\n> [...]\n> +test_expect_success $PREREQ 'use email list in --cc --to and --bcc' '\n\nWhat is the meaning of this test?  It looks like you've run git\nsend-email twice in exactly the same way, and compared their outputs\n(after smudging the unstable headers).\n"},{"id":"221181","messageId":"0ad4bd4930efddcbaa5ed958c6758894@ensibm.imag.fr","threadId":"34191","inReplyTo":"CALkWK0=vytkxM3yzVaed+i3Q+RpvH=tSLndf=vUmiYC=sn=nFg@mail.gmail.com","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Mathieu Liénard--Mayor","fromEmail":"mathieu.lienard--mayor@ensimag.fr","sentAt":"2013-06-18T10:54:05Z","receivedAt":"2013-06-18T10:54:05Z","isPatch":true,"sender":{"key":"mathieu.lienard--mayor@ensimag.fr","avatar":null},"body":"Le 2013-06-18 12:47, Ramkumar Ramachandra a écrit :\n> Jorge-Juan.Garcia-Garcia@ensimag.imag.fr wrote:\n>> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n>> index 9f46f22..87641bc 100755\n>> --- a/t/t9001-send-email.sh\n>> +++ b/t/t9001-send-email.sh\n>> @@ -1349,4 +1349,39 @@ test_expect_success $PREREQ \n>> 'sendemail.aliasfile=~/.mailrc' '\n>>         grep \"^!someone@example\\.org!$\" commandline1\n>>  '\n>>\n>> -test_done\n>> +test_expect_success $PREREQ 'setup expected-list' '\n>> [...]\n>> +test_expect_success $PREREQ 'use email list in --cc --to and --bcc' \n>> '\n>\n> What is the meaning of this test?  It looks like you've run git\n> send-email twice in exactly the same way, and compared their outputs\n> (after smudging the unstable headers).\nThe first one uses one flag per email address, just like we had to do \nso far.\nThe second one uses one email-list per flag, which is the new feature \nwe're introducing.\nThen we compare the output of the two, and expect it to be exactly the \nsame.\n\nShouldn't\n\n$ git send-email --cc 'foo@example.com' --cc 'bar@example.com'\n\nand\n\n$ git send-email --cc 'foo@example.com, bar@example.com'\n\nhave the exact same effect ?\n-- \nMathieu Liénard--Mayor,\n2nd year at Grenoble INP - ENSIMAG\n(+33)6 80 56 30 02\n"},{"id":"221183","messageId":"CALkWK0=rTk2Jx7x_sx1BcwFXWVa4TR=gp2+1Sx3COdMeO_2iZw@mail.gmail.com","threadId":"34191","inReplyTo":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T10:55:23Z","receivedAt":"2013-06-18T10:55:23Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jorge-Juan.Garcia-Garcia@ensimag.imag.fr wrote:\n> +sub split_email_list {\n> +    my(@list) = @_;\n> +    my @tmp;\n> +    my @emails;\n> +       for (my $i = 0; $i <= $#list; $i++) {\n> +           if ($list[$i] =~ /,/) {\n> +               @emails = split(/,/, $list[$i]);\n> +           } else {\n> +               @emails = $list[$i];\n> +           }\n\nPerhaps use map like in sanitize_address_list and\nvalidate_address_list to prettify this?\n"},{"id":"221184","messageId":"CALkWK0nqQt9mP95NKnyucdAxXekj+OFsp5XsF8wXxoCRjLNbvg@mail.gmail.com","threadId":"34191","inReplyTo":"0ad4bd4930efddcbaa5ed958c6758894@ensibm.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T10:58:50Z","receivedAt":"2013-06-18T10:58:50Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Mathieu Liénard--Mayor wrote:\n> Shouldn't\n>\n> $ git send-email --cc 'foo@example.com' --cc 'bar@example.com'\n>\n> and\n>\n> $ git send-email --cc 'foo@example.com, bar@example.com'\n>\n> have the exact same effect ?\n\nAh.  Perhaps it would be clearer to check the headers directly like in\nthe other tests?\n"},{"id":"221185","messageId":"vpq1u7zu18j.fsf@anie.imag.fr","threadId":"34191","inReplyTo":"CALkWK0nqQt9mP95NKnyucdAxXekj+OFsp5XsF8wXxoCRjLNbvg@mail.gmail.com","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-06-18T11:06:36Z","receivedAt":"2013-06-18T11:06:36Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Mathieu Liénard--Mayor wrote:\n>> Shouldn't\n>>\n>> $ git send-email --cc 'foo@example.com' --cc 'bar@example.com'\n>>\n>> and\n>>\n>> $ git send-email --cc 'foo@example.com, bar@example.com'\n>>\n>> have the exact same effect ?\n>\n> Ah.  Perhaps it would be clearer to check the headers directly like in\n> the other tests?\n\nActually, I find it more elegant like this: it doesn't rely on the\nparticular layout of headers, so the tests would still pass if something\nelse is changed in the headers.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"221234","messageId":"7vip1b8nut.fsf@alter.siamese.dyndns.org","threadId":"34191","inReplyTo":"1371549079-19291-1-git-send-email-Jorge-Juan.Garcia-Garcia@ensimag.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-18T15:01:14Z","receivedAt":"2013-06-18T15:01:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jorge-Juan.Garcia-Garcia@ensimag.imag.fr writes:\n\n> From: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>\n>\n> Make it so that we can use a list of email in flags\n> instead of having to use one flag per email address.\n>\n> The format of email list handled is pretty basic for now:\n> \t$ git send-email --to='Foo <foo@example.com>, bar@example.com'\n> We thought it would be nice to have a \"first-step\" version which works\n> before handling more complex ones such as:\n> \t$ git send-email --to='Foo, Bar <foobar@example.com>'\n\nDoesn't\n\n\tgit send-email --to='Foo <foo@example.com>' --to='bar@example.com'\n\nwork?  If it does, I do not see much point of this change.  If you\nare starting from two pieces of information, why combine it into\none, only have the program to split it again, risking to be bitten\nby bugs, and changing the code to do so, risking to add new bugs?\n"},{"id":"221236","messageId":"vpqehbzpihh.fsf@anie.imag.fr","threadId":"34191","inReplyTo":"7vip1b8nut.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-06-18T15:05:14Z","receivedAt":"2013-06-18T15:05:14Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Doesn't\n>\n> \tgit send-email --to='Foo <foo@example.com>' --to='bar@example.com'\n>\n> work?  If it does, I do not see much point of this change.  If you\n> are starting from two pieces of information, why combine it into\n> one, only have the program to split it again, risking to be bitten\n> by bugs, and changing the code to do so, risking to add new bugs?\n\nThe obvious use-case is to copy-paste a list of addresses from an email.\nCurrently, the Cc: list of the email I'm sending looks like\n\nCc: Jorge-Juan.Garcia-Garcia@ensimag.imag.fr,  git@vger.kernel.org,  Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>\n\nIf I were to use \"git send-email\" on it, I'd have to cut the list\nmyself.\n\nThis could be mentionned in the commit message.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"221251","messageId":"7va9mn75bo.fsf@alter.siamese.dyndns.org","threadId":"34191","inReplyTo":"vpqehbzpihh.fsf@anie.imag.fr","subject":"Re: [PATCH] send-email: allow use of basic email list in --cc --to and --bcc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-18T16:26:51Z","receivedAt":"2013-06-18T16:26:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> The obvious use-case is to copy-paste a list of addresses from an email.\n> ...\n> This could be mentionned in the commit message.\n\nOK.\n"}]}