@matheusbsbs / matheus-bagliano / commits / 8baf06a03a
Fork 0

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>

Ryan Anderson committed May 29, 2006 at 12:30 UTC 8baf06a03aa2a4554079a2f722af1751f1654ce8
1 file changed +6 -1
git-send-email.perl
+6 -1
@@ -322,7 +322,11 @@ sub extract_valid_address {
322 } else {
323 # less robust/correct than the monster regexp in Email::Valid,
324 # but still does a 99% job, and one less dependency
325 - return ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
325 + my $cleaned_address;
326 + if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
327 + $cleaned_address = $1;
328 + }
329 + return $cleaned_address;
330 }
331 }
332
@@ -416,6 +420,7 @@ X-Mailer: git-send-email $gitversion
420 }
421
422 $reply_to = $initial_reply_to;
423 +$references = $initial_reply_to;
424 make_message_id();
425 $subject = $initial_subject;
426