[PATCH] Understand the meaning of commas in git-send-email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

--- /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;
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]