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

[PATCH] send-email: quiet some warnings

From
EWEric Wong <normalperson@yhbt.net>
Date
May 15, 2006, 02:38 UTC
Message-ID
<11476606883991-git-send-email-normalperson@yhbt.net>
In-Reply-To
<1147660345772-git-send-email-normalperson@yhbt.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-send-email.perl |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
0e5a33f56f62e527b74b2afbd93a1cca812f97af
diff --git a/git-send-email.perl b/git-send-email.perl
index d27a7a5..379e0c4 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -507,8 +507,16 @@ sub unique_email_list(@) {
 	my @emails;
 
 	foreach my $entry (@_) {
-		my $clean = extract_valid_address($entry);
-		next if $seen{$clean}++;
+		if (my $clean = extract_valid_address($entry)) {
+			$seen{$clean} ||= 0;
+			next if $seen{$clean}++;
+		} else {
+			# it could still be a local email address without '@',
+			# which neither Email::Valid or our own small regex says
+			# is valid...
+			$seen{$entry} ||= 0;
+			next if $seen{$entry}++;
+		}
 		push @emails, $entry;
 	}
 	return @emails;
-- 
1.3.2.g0e5a
Previous: Eric WongNext: Junio C Hamano
Message 3 of 17 in “send-email: allow sendmail binary to be used instead of SMTP”
  1. send-email: allow sendmail binary to be used instead of SMTPEric Wong, May 15, 2006
  2. Eric WongMay 15, 2006
  3. send-email: quiet some warningsEric Wong, May 15, 2006
  4. Junio C HamanoMay 15, 2006
  5. send-email: quiet some warnings, reject invalid addressesEric Wong, May 15, 2006
  6. Junio C HamanoMay 15, 2006
  7. Eric WongMay 15, 2006
  8. send-email: allow sendmail binary to be used instead of SMTPEric Wong, May 15, 2006
  9. Junio C HamanoMay 15, 2006
  10. Eric WongMay 15, 2006
  11. Martin LanghoffMay 15, 2006
  12. Junio C HamanoMay 15, 2006
  13. Eric WongMay 15, 2006
  14. Ryan AndersonMay 15, 2006
  15. Junio C HamanoMay 15, 2006
  16. Ryan AndersonMay 15, 2006
  17. Martin LanghoffMay 15, 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.