1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 10:36:15 +02:00
git/perl
Matthieu Moy bd869f67b9 send-email: add and use a local copy of Mail::Address
We used to have two versions of the email parsing code. Our
parse_mailboxes (in Git.pm), and Mail::Address which we used if
installed. Unfortunately, both versions have different sets of bugs, and
changing the behavior of git depending on whether Mail::Address is
installed was a bad idea.

A first attempt to solve this was cc90750 (send-email: don't use
Mail::Address, even if available, 2017-08-23), but it turns out our
parse_mailboxes is too buggy for some uses. For example the lack of
nested comments support breaks get_maintainer.pl in the Linux kernel
tree:

  https://public-inbox.org/git/20171116154814.23785-1-alex.bennee@linaro.org/

This patch goes the other way: use Mail::Address anyway, but have a
local copy from CPAN as a fallback, when the system one is not
available.

The duplicated script is small (276 lines of code) and stable in time.
Maintaining the local copy should not be an issue, and will certainly be
less burden than maintaining our own parse_mailboxes.

Another option would be to consider Mail::Address as a hard dependency,
but it's easy enough to save the trouble of extra-dependency to the end
user or packager.

Signed-off-by: Matthieu Moy <git@matthieu-moy.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-05 12:21:31 -08:00
..
Git send-email: add and use a local copy of Mail::Address 2018-01-05 12:21:31 -08:00
.gitignore perl: detect new files in MakeMaker builds 2012-07-27 22:14:02 +00:00
Git.pm Merge branch 'jc/perl-git-comment-typofix' 2017-08-22 10:29:06 -07:00
Makefile Git/Packet.pm: extract parts of t0021/rot13-filter.pl for reuse 2017-11-07 10:26:01 +09:00
Makefile.PL The Makefile.PL will now find .pm files itself. 2012-07-27 22:13:28 +00:00
private-Error.pm Correct common spelling mistakes in comments and tests 2013-04-12 13:38:40 -07:00