Skip to content

Commit

Permalink
Merge branch 'jk/send-email-rtrim-mailrc-alias'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
Junio C Hamano committed Apr 6, 2016
2 parents 67827f5 + a277d1e commit f4ee510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ sub parse_sendmail_aliases {
$aliases{$alias} = \@addr
}}},
mailrc => sub { my $fh = shift; while (<$fh>) {
if (/^alias\s+(\S+)\s+(.*)$/) {
if (/^alias\s+(\S+)\s+(.*?)\s*$/) {
# spaces delimit multiple addresses
$aliases{$1} = [ quotewords('\s+', 0, $2) ];
}}},
Expand Down

0 comments on commit f4ee510

Please sign in to comment.