From: Krzysztof Mazur Date: Thu, 22 Nov 2012 18:12:09 +0000 (+0100) Subject: git-send-email: fix fallback code in extract_valid_address() X-Git-Tag: v1.8.1-rc0~8^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/95c0d4b68a0fcba3adf45ce3a8f1edf99a9030a1?ds=inline;hp=95c0d4b68a0fcba3adf45ce3a8f1edf99a9030a1 git-send-email: fix fallback code in extract_valid_address() In the fallback check, used when Email::Valid is not available, the extract_valid_address() uses $1 without checking for success of matching regex. The $1 variable may still hold the result of previous match, which is the address when email address was in '<>' or be undefined otherwise. Now if match fails undefined value is always returned to indicate error. The same value is used by Email::Valid->address() in that case. Previously 'foo@bar' address was rejected by Email::Valid and fallback, but '' was rejected by Email::Valid, but accepted by fallback. Signed-off-by: Krzysztof Mazur Signed-off-by: Junio C Hamano ---