{"thread":{"id":"5872","subject":"[PATCH] Understand the meaning of commas in git-send-email","startedAt":"2006-10-10T14:59:36Z","lastAt":"2006-10-10T17:44:56Z","messageCount":2,"participants":["Matthew Wilcox","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28517","messageId":"20061010145936.GC8993@parisc-linux.org","threadId":"5872","inReplyTo":null,"subject":"[PATCH] Understand the meaning of commas in git-send-email","fromName":"Matthew Wilcox","fromEmail":"matthew@wil.cx","sentAt":"2006-10-10T14:59:36Z","receivedAt":"2006-10-10T14:59:36Z","isPatch":true,"sender":{"key":"matthew@wil.cx","avatar":null},"body":"\nI made the mistake of adding one Cc: line with two email addresses on\nit, instead of two Cc: lines with one email address each.  Extending\ngit-send-email to parse that case turns out to not be too much work.\n\nSigned-off-by: Matthew Wilcox <matthew@wil.cx>\n\n--- /usr/bin/git-send-email\t2006-07-29 09:52:13.000000000 -0600\n+++ ./git-send-email.perl\t2006-10-10 08:46:13.000000000 -0600\n@@ -537,13 +542,15 @@\n \tmy @emails;\n \n \tforeach my $entry (@_) {\n-\t\tif (my $clean = extract_valid_address($entry)) {\n-\t\t\t$seen{$clean} ||= 0;\n-\t\t\tnext if $seen{$clean}++;\n-\t\t\tpush @emails, $entry;\n-\t\t} else {\n-\t\t\tprint STDERR \"W: unable to extract a valid address\",\n-\t\t\t\t\t\" from: $entry\\n\";\n+\t\tforeach my $addr (split(/, */, $entry)) {\n+\t\t\tif (my $clean = extract_valid_address($addr)) {\n+\t\t\t\t$seen{$clean} ||= 0;\n+\t\t\t\tnext if $seen{$clean}++;\n+\t\t\t\tpush @emails, $addr;\n+\t\t\t} else {\n+\t\t\t\tprint STDERR \"W: unable to extract a valid\",\n+\t\t\t\t\t\" address from: $entry\\n\";\n+\t\t\t}\n \t\t}\n \t}\n \treturn @emails;\n"},{"id":"28527","messageId":"7vzmc412w7.fsf@assigned-by-dhcp.cox.net","threadId":"5872","inReplyTo":"20061010145936.GC8993@parisc-linux.org","subject":"Re: [PATCH] Understand the meaning of commas in git-send-email","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-10T17:44:56Z","receivedAt":"2006-10-10T17:44:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthew Wilcox <matthew@wil.cx> writes:\n\n> I made the mistake of adding one Cc: line with two email addresses on\n> it, instead of two Cc: lines with one email address each.  Extending\n> git-send-email to parse that case turns out to not be too much work.\n>\n> Signed-off-by: Matthew Wilcox <matthew@wil.cx>\n\nI am not sure.  The input addresses this part of the code deals\nwith are of human readable form \n\n\tMatthew Wilcox <matthew@wil.cx>\n        matthew@wil.cx (Matthew Wilcox)\n\nand the loop is extracting the part inside <> pair.\n\nI have a mild suspicion that your patch may need to understand\nquoting to handle somebody else's name safely and correctly.\n\n\tjunkio@cox.net (Junio C Hamano, aka gitster)\n"}]}