Thread (15 messages) flat view 15 messages, 2 authors, 2016-06-15

Re: [PATCH 1/9] send-email: further document missing sendmail aliases functionality

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:05:05
Subsystem: the rest · Maintainer: Linus Torvalds

On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote:
On May 31, 2015 at 6:29 PM, Eric Sunshine [off-list ref] wrote:
quoted
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 <redacted>
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 <redacted>
---
 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 ---
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help