From: Allen Hubbe Date: Mon, 01 Jun 2015 22:44:49 GMT Subject: Re: [PATCH 1/9] send-email: further document missing sendmail aliases functionality Message-ID: In-Reply-To: <20150601182236.GA28030@flurp.local> This looks good. On Mon, Jun 1, 2015 at 2:22 PM, Eric Sunshine wrote: > On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote: >> On May 31, 2015 at 6:29 PM, Eric Sunshine wrote: >> > Sendmail aliases[1] supports expansion to a file ("/path/name") or >> > pipe ("|command"), as well as file inclusion (":include: /path/name"), >> > however, our implementation does not support such functionality. >> >> According to the documentation, the parser should print a warning for >> any explicitly unsupported constructs. These are now explicitly >> unsupported, so the parser should warn on |, /, and :include: . >> Perhaps the lines that match should be ignored like the others, too. > > Indeed. I had that in mind and then promptly forgot about it. Here's a > follow-on patch: > > --- >8 --- > From: Eric Sunshine > Subject: [PATCH 10/9] send-email: further warn about unsupported sendmail aliases features > > The sendmail aliases parser diagnoses unsupported features and > unrecognized lines. For completeness, also warn about unsupported > redirection to "/path/name" and "|command", as well as ":include:". > > Signed-off-by: Eric Sunshine > --- > git-send-email.perl | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/git-send-email.perl b/git-send-email.perl > index eb1d678..ae9f869 100755 > --- a/git-send-email.perl > +++ b/git-send-email.perl > @@ -492,6 +492,10 @@ sub parse_sendmail_alias { > local $_ = shift; > if (/"/) { > print STDERR "warning: sendmail alias with quotes 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) ]; > -- > 2.4.2.538.g5f4350e > > --- >8 ---