summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Moy <git@matthieu-moy.fr>2017-08-23 10:21:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-24 21:40:17 (GMT)
commitcc9075067776ebd34cc08f31bf78bb05f12fd879 (patch)
tree9e7bd9e13aeb9a2d79cebbf0af76b03fe8b1a1c9
parentcb2922fe4b2a82e2174d419781836e768651ebff (diff)
downloadgit-cc9075067776ebd34cc08f31bf78bb05f12fd879.zip
git-cc9075067776ebd34cc08f31bf78bb05f12fd879.tar.gz
git-cc9075067776ebd34cc08f31bf78bb05f12fd879.tar.bz2
send-email: don't use Mail::Address, even if available
Using Mail::Address made sense when we didn't have a proper parser. We now have a reasonable address parser, and using Mail::Address _if available_ causes much more trouble than it gives benefits: * Developers typically test one version, not both. * Users may not be aware that installing Mail::Address will change the behavior. They may complain about the behavior in one case without knowing that Mail::Address is involved. * Having this optional Mail::Address makes it tempting to anwser "please install Mail::Address" to users instead of fixing our own code. We've reached the stage where bugs in our parser should be fixed, not worked around. Signed-off-by: Matthieu Moy <git@matthieu-moy.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-send-email.perl7
1 files changed, 1 insertions, 6 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 33a69ff..2208dcc 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -155,7 +155,6 @@ sub format_2822_time {
}
my $have_email_valid = eval { require Email::Valid; 1 };
-my $have_mail_address = eval { require Mail::Address; 1 };
my $smtp;
my $auth;
my $num_sent = 0;
@@ -490,11 +489,7 @@ my ($repoauthor, $repocommitter);
($repocommitter) = Git::ident_person(@repo, 'committer');
sub parse_address_line {
- if ($have_mail_address) {
- return map { $_->format } Mail::Address->parse($_[0]);
- } else {
- return Git::parse_mailboxes($_[0]);
- }
+ return Git::parse_mailboxes($_[0]);
}
sub split_addrs {