t6300: introduce test_date() helper
[gitweb.git] / git-send-email.perl
index e777bd3a60b16f735733df8d30e9e6b273857f2e..ae9f8698c5a4842c2c0d63db51dde067ddeeb1c9 100755 (executable)
@@ -492,8 +492,10 @@ sub parse_sendmail_alias {
        local $_ = shift;
        if (/"/) {
                print STDERR "warning: sendmail alias with quotes is not supported: $_\n";
-       } elsif (/^\s|\\$/) {
-               print STDERR "warning: sendmail continuation line is not supported: $_\n";
+       } elsif (/:include:/) {
+               print STDERR "warning: `:include:` not supported: $_\n";
+       } elsif (/[\/|]/) {
+               print STDERR "warning: `/file` or `|pipe` redirection not supported: $_\n";
        } elsif (/^(\S+?)\s*:\s*(.+)$/) {
                my ($alias, $addr) = ($1, $2);
                $aliases{$alias} = [ split_addrs($addr) ];
@@ -504,10 +506,16 @@ sub parse_sendmail_alias {
 
 sub parse_sendmail_aliases {
        my $fh = shift;
+       my $s = '';
        while (<$fh>) {
+               chomp;
                next if /^\s*$/ || /^\s*#/;
-               parse_sendmail_alias($_);
+               $s .= $_, next if $s =~ s/\\$// || s/^\s+//;
+               parse_sendmail_alias($s) if $s;
+               $s = $_;
        }
+       $s =~ s/\\$//; # silently tolerate stray '\' on last line
+       parse_sendmail_alias($s) if $s;
 }
 
 my %parse_alias = (