git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nicolas Troncoso Carrere <ntroncos@alumnos.inf.utfsm.cl>
To: git@vger.kernel.org
Subject: [PATCH] git-send-email.perl extract_valid_address issue
Date: Mon, 29 May 2006 00:00:44 -0400	[thread overview]
Message-ID: <200605290000.44463.ntroncos@alumnos.inf.utfsm.cl> (raw)


The third fallback was returning if the match was done or not instead of
returning the actual email address that was matched. This prevented sending
the mail to the people included in the CC. This bug only affect those that
dont have Email::Valid.

I initialized $valid_email as undef so it would mimic the behavior of 
Email::Verify->address(), which returns undef if no valid address was found.

Signed-off-by: Nicolas <ntroncos@inf.utfsm.cl>


---

 git-send-email.perl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

84853ca89c15de7a24e9eb9fd422654b86c63be9
diff --git a/git-send-email.perl b/git-send-email.perl
index 312a4ea..dfff3e6 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -316,7 +316,9 @@ 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 $valid_email=undef;
+                ($valid_email ) = ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
+                return ($valid_email);
 	}
 }
-- 
Nicolás Troncoso Carrère                        User #272312 counter.li.org
Estudiante Magíster en Ciencias de la Informática
Universidad Técnica Federico Santa María
http://www.alumnos.inf.utfsm.cl/~ntroncos

             reply	other threads:[~2006-05-29  3:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-29  4:00 Nicolas Troncoso Carrere [this message]
2006-05-29 20:00 ` [PATCH] git-send-email.perl extract_valid_address issue Ryan Anderson
2006-05-29 21:06   ` Horst von Brand
2006-05-29 21:09   ` Horst von Brand
2006-05-29 22:12     ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605290000.44463.ntroncos@alumnos.inf.utfsm.cl \
    --to=ntroncos@alumnos.inf.utfsm.cl \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).