summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aca7ad7)
raw | patch | inline | side by side (parent: aca7ad7)
author | Eric Wong <normalperson@yhbt.net> | |
Mon, 15 May 2006 09:41:01 +0000 (02:41 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 15 May 2006 19:14:22 +0000 (12:14 -0700) |
I'm not sure why we never actually rejected invalid addresses in
the first place. We just seemed to be using our email validity
checkers to kill duplicates.
Now we just drop invalid email addresses completely and warn
the user about it.
Since we support local sendmail, we'll also accept username-only
addresses.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
the first place. We just seemed to be using our email validity
checkers to kill duplicates.
Now we just drop invalid email addresses completely and warn
the user about it.
Since we support local sendmail, we'll also accept username-only
addresses.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 0540e93758e45a03ad87272b0ceed9acb8973f53..312a4ea2aa10189eeb470a185993bb7f8af45d0e 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
sub extract_valid_address {
my $address = shift;
+
+ # check for a local address:
+ return $address if ($address =~ /^([\w\-]+)$/);
+
if ($have_email_valid) {
return Email::Valid->address($address);
} else {
my @emails;
foreach my $entry (@_) {
- my $clean = extract_valid_address($entry);
- next if $seen{$clean}++;
- push @emails, $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";
+ }
}
return @emails;
}