send-email: reduce dependencies impact on parse_address_line
commit8d314d7afec5adaaa8e22332e39fe84a39584653
authorRemi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Tue, 7 Jul 2015 13:38:15 +0000 (7 15:38 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jul 2015 21:38:20 +0000 (7 14:38 -0700)
tree4ce65606a30b62be55579e4b022e8201bf08fee5
parentc46e27aa774eae2ac58f1763afe00108f3a1e5d3
send-email: reduce dependencies impact on parse_address_line

parse_address_line had not the same behavior whether the user had
Mail::Address or not. Teach parse_address_line to behave like
Mail::Address.

When the user input is correct, this implementation behaves
exactly like Mail::Address except when there are quotes
inside the name:

  "Jane Do"e <jdoe@example.com>

In this case the result of parse_address_line is:

  With M::A : "Jane Do" e <jdoe@example.com>
  Without   : "Jane Do e" <jdoe@example.com>

When the user input is not correct, the behavior is also mostly
the same.

Unlike Mail::Address, this doesn't parse groups and recursive
commentaries.

Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
perl/Git.pm
t/t9000-addresses.sh [new file with mode: 0755]
t/t9000/test.pl [new file with mode: 0755]