Merge branch 'jk/send-email-rtrim-mailrc-alias' into maint

"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
  send-email: ignore trailing whitespace in mailrc alias file
This commit is contained in:
Junio C Hamano 2016-04-14 18:57:47 -07:00
Родитель 517736ffcf a277d1efa3
Коммит 8cad7fcfbc
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -533,7 +533,7 @@ my %parse_alias = (
$aliases{$alias} = \@addr $aliases{$alias} = \@addr
}}}, }}},
mailrc => sub { my $fh = shift; while (<$fh>) { mailrc => sub { my $fh = shift; while (<$fh>) {
if (/^alias\s+(\S+)\s+(.*)$/) { if (/^alias\s+(\S+)\s+(.*?)\s*$/) {
# spaces delimit multiple addresses # spaces delimit multiple addresses
$aliases{$1} = [ quotewords('\s+', 0, $2) ]; $aliases{$1} = [ quotewords('\s+', 0, $2) ];
}}}, }}},