* [PATCH] Understand the meaning of commas in git-send-email
@ 2006-10-10 14:59 Matthew Wilcox
2006-10-10 17:44 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2006-10-10 14:59 UTC (permalink / raw)
To: git
I made the mistake of adding one Cc: line with two email addresses on
it, instead of two Cc: lines with one email address each. Extending
git-send-email to parse that case turns out to not be too much work.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
--- /usr/bin/git-send-email 2006-07-29 09:52:13.000000000 -0600
+++ ./git-send-email.perl 2006-10-10 08:46:13.000000000 -0600
@@ -537,13 +542,15 @@
my @emails;
foreach my $entry (@_) {
- if (my $clean = extract_valid_address($entry)) {
- $seen{$clean} ||= 0;
- next if $seen{$clean}++;
- push @emails, $entry;
- } else {
- print STDERR "W: unable to extract a valid address",
- " from: $entry\n";
+ foreach my $addr (split(/, */, $entry)) {
+ if (my $clean = extract_valid_address($addr)) {
+ $seen{$clean} ||= 0;
+ next if $seen{$clean}++;
+ push @emails, $addr;
+ } else {
+ print STDERR "W: unable to extract a valid",
+ " address from: $entry\n";
+ }
}
}
return @emails;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Understand the meaning of commas in git-send-email
2006-10-10 14:59 [PATCH] Understand the meaning of commas in git-send-email Matthew Wilcox
@ 2006-10-10 17:44 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2006-10-10 17:44 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: git
Matthew Wilcox <matthew@wil.cx> writes:
> I made the mistake of adding one Cc: line with two email addresses on
> it, instead of two Cc: lines with one email address each. Extending
> git-send-email to parse that case turns out to not be too much work.
>
> Signed-off-by: Matthew Wilcox <matthew@wil.cx>
I am not sure. The input addresses this part of the code deals
with are of human readable form
Matthew Wilcox <matthew@wil.cx>
matthew@wil.cx (Matthew Wilcox)
and the loop is extracting the part inside <> pair.
I have a mild suspicion that your patch may need to understand
quoting to handle somebody else's name safely and correctly.
junkio@cox.net (Junio C Hamano, aka gitster)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-10 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 14:59 [PATCH] Understand the meaning of commas in git-send-email Matthew Wilcox
2006-10-10 17:44 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.