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

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

From
MWMatthew Wilcox <matthew@wil.cx>
Date
Oct 10, 2006, 14:59 UTC
Message-ID
<20061010145936.GC8993@parisc-linux.org>

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;
Next: Junio C Hamano
Message 1 of 2 in “Understand the meaning of commas in git-send-email”
  1. Understand the meaning of commas in git-send-emailMatthew Wilcox, Oct 10, 2006
  2. Junio C HamanoOct 10, 2006

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.