Re: [PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-10 Thread Matthieu Moy
Nothing serious, but you did something weird while sending. This message
does not have a References: or an In-reply-to: field, so it breaks
threading. See how it's displayed on

  http://thread.gmane.org/gmane.comp.version-control.git

Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes:

 Remove leading and trailing whitespaces when sanitizing addresses so
 that git send-email give the same output when passing arguments like
  j...@example.comor \t j...@example.com  as with
 j...@example.com.

 The next commit will introduce a test for this aswell.

s/aswell/as well/

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-10 Thread Remi Lespinet
 Nothing serious, but you did something weird while sending. This message
 does not have a References: or an In-reply-to: field, so it breaks
 threading. See how it's displayed on
 
   http://thread.gmane.org/gmane.comp.version-control.git

Yes, send-email was aborted after 5/7, I realized and retry
sending 6/7 and 7/7 but I didn't noticed that. I'll be
careful next time, thanks.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-09 Thread Remi Lespinet
Remove leading and trailing whitespaces when sanitizing addresses so
that git send-email give the same output when passing arguments like
 j...@example.comor \t j...@example.com  as with
j...@example.com.

The next commit will introduce a test for this aswell.

Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr
---
 git-send-email.perl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/git-send-email.perl b/git-send-email.perl
index ea03308..3d144bd 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -978,6 +978,9 @@ sub sanitize_address {
# remove garbage after email address
$recipient =~ s/(.*).*$/$1/;
 
+   # remove leading and trailing whitespace
+   $recipient =~ s/^\s+|\s+$//g;
+
my ($recipient_name, $recipient_addr) = ($recipient =~ 
/^(.*?)\s*(.*)/);
 
if (not $recipient_name) {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html