summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2007-08-09 15:27:57 +0200
committerJunio C Hamano <gitster@pobox.com>2007-08-10 01:00:51 -0700
commit155197e6e770599a5ed7a33a33f2916032184dd3 (patch)
treeb0298d2965f664839b439245eace652780ee0679 /git-send-email.perl
parentcabead982b7cf40f8930e6e38327fc396b7fef81 (diff)
downloadgit-155197e6e770599a5ed7a33a33f2916032184dd3.tar.gz
send-email: rfc822 forbids using <address@domain> without a non-empty "phrase"
Email::Valid does respect this considering such a mailbox specification invalid. b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0 addressed the issue, but only if Email::Valid is available. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 39e433b76b..a02ab9694f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -408,8 +408,8 @@ sub extract_valid_address {
# check for a local address:
return $address if ($address =~ /^($local_part_regexp)$/);
+ $address =~ s/^\s*<(.*)>\s*$/$1/;
if ($have_email_valid) {
- $address =~ s/^\s*<(.*)>\s*$/$1/;
return scalar Email::Valid->address($address);
} else {
# less robust/correct than the monster regexp in Email::Valid,