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

Re: [PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2015, 16:52 UTC
Message-ID
<xmqqmw0j74mg.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqiob78nij.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> writes:
>
>> Accept a list of emails separated by commas in flags --cc, --to and
>> --bcc.  Multiple addresses can already be given by using these options
>> multiple times, but it is more convenient to allow cutting-and-pasting
>> a list of addresses from the header of an existing e-mail message,
>> which already lists them as comma-separated list, as a value to a
>> single parameter.
>>
>> The following format can now be used:
>>
>>     $ git send-email --to='Jane <jdoe@example.com>, mike@example.com'
>>
>> However format using commas in names doesn't work:
>>
>>     $ git send-email --to='"Jane, Doe" <jdoe@example.com>'
>
> That looks as if you are doing "Remi, Lespinet", which is not a good
> example.  I think you want "Doe, Jane", the use of comma is when a
> name is spelled in the "LastName, FirstName" order.

Having thought about this topic (not how the example should be spelled in the log message ;-) a bit more, I do not think the implementation of split_address_list_items in this patch is acceptable.

The reason why we have the "verify the input" thing, allow users to supply multiple --to/--cc/etc., and do not try to split the addresses ourselves is because we want to avoid mistakenly splitting a single address like the above into two and producing syntactically incorrect addresses. People have relied on the current behaviour for a long time, without manually dropping comma when they send their patches with --to='"Jane, Doe" <jdoe@example.com>'.

Until we can reliably split the address list, accepting this patch will introduce a regression.

Note that I do agree with the goal of this series and appreciate the effort. I am only rejecting the current implementation of split_address_list_items().

Thanks.
Previous: Junio C HamanoNext: Rémi Lespinet
Message 5 of 7 in “t9001-send-email: create a function replacing variable fields”
  1. 1/2 t9001-send-email: create a function replacing variable fieldsRemi Lespinet, Jun 1, 2015
  2. 2/2 send-email: allow multiple emails using --cc, --to and --bccRemi Lespinet, Jun 1, 2015
  3. Matthieu MoyJun 1, 2015
  4. Junio C HamanoJun 1, 2015
  5. Junio C HamanoJun 1, 2015
  6. Rémi LespinetJun 2, 2015
  7. Junio C HamanoJun 2, 2015

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.