summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorRyan Anderson <rda@google.com>2006-05-29 12:30:14 -0700
committerJunio C Hamano <junkio@cox.net>2006-05-29 23:15:37 -0700
commit8baf06a03aa2a4554079a2f722af1751f1654ce8 (patch)
tree7cb4e675204964ee51cec1debd6444e61acbea92 /git-send-email.perl
parent580632458902b440cba41f0a5a1d27192221e1b9 (diff)
downloadgit-8baf06a03aa2a4554079a2f722af1751f1654ce8.tar.gz
Fix a bug in email extraction used in git-send-email.
(Also, kill off an accidentally created warning.) Signed-off-by: Ryan Anderson <rda@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 85ec5df13a..d418d6c5d2 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -322,7 +322,11 @@ sub extract_valid_address {
} else {
# less robust/correct than the monster regexp in Email::Valid,
# but still does a 99% job, and one less dependency
- return ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
+ my $cleaned_address;
+ if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
+ $cleaned_address = $1;
+ }
+ return $cleaned_address;
}
}
@@ -416,6 +420,7 @@ X-Mailer: git-send-email $gitversion
}
$reply_to = $initial_reply_to;
+$references = $initial_reply_to;
make_message_id();
$subject = $initial_subject;