From: Ryan Anderson Date: Mon, 29 May 2006 19:30:14 +0000 (-0700) Subject: Fix a bug in email extraction used in git-send-email. X-Git-Tag: v1.4.0-rc1~31 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=8baf06a03aa2a4554079a2f722af1751f1654ce8 Fix a bug in email extraction used in git-send-email. (Also, kill off an accidentally created warning.) Signed-off-by: Ryan Anderson Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 85ec5df1..d418d6c5 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;