git-send-email: remove garbage after email address
commit831a488b76e0fcad68c6d1c7aaf9f086199e1738
authorKrzysztof Mazur <krzysiek@podlesie.net>
Thu, 22 Nov 2012 18:12:08 +0000 (22 19:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Nov 2012 16:16:36 +0000 (26 08:16 -0800)
tree88f934df14fe847a88d78eb2f53ef780bd1f2b6e
parente8a1f5a2ae53805986b1b965e036450bdfc0c460
git-send-email: remove garbage after email address

In some cases it is useful to add additional information after the
email address on the Cc: footer in a commit log, for instance:

"Cc: Stable kernel <stable@vger.kernel.org> #v3.4 v3.5 v3.6"

However, git-send-email refuses to pick up such an invalid address
when the Email::Valid perl module is available, or just uses the
whole line as the email address.

In sanitize_address(), remove everything after the email address, so
that the result is a valid email address that makes Email::Valid
happy.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl