send-email: drop noise comments which merely repeat what code says
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
818a2d7722
commit
2cdaabb6f9
@ -517,26 +517,21 @@ my %parse_alias = (
|
|||||||
} },
|
} },
|
||||||
|
|
||||||
sendmail => sub { my $fh = shift; while (<$fh>) {
|
sendmail => sub { my $fh = shift; while (<$fh>) {
|
||||||
# ignore blank lines and comment lines
|
|
||||||
if (/^\s*(?:#.*)?$/) { }
|
if (/^\s*(?:#.*)?$/) { }
|
||||||
|
|
||||||
# warn on lines that contain quotes
|
|
||||||
elsif (/"/) {
|
elsif (/"/) {
|
||||||
print STDERR "warning: sendmail alias with quotes is not supported: $_\n";
|
print STDERR "warning: sendmail alias with quotes is not supported: $_\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# warn on lines that continue
|
|
||||||
elsif (/^\s|\\$/) {
|
elsif (/^\s|\\$/) {
|
||||||
print STDERR "warning: sendmail continuation line is not supported: $_\n";
|
print STDERR "warning: sendmail continuation line is not supported: $_\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# recognize lines that look like an alias
|
|
||||||
elsif (/^(\S+?)\s*:\s*(.+)$/) {
|
elsif (/^(\S+?)\s*:\s*(.+)$/) {
|
||||||
my ($alias, $addr) = ($1, $2);
|
my ($alias, $addr) = ($1, $2);
|
||||||
$aliases{$alias} = [ split_addrs($addr) ];
|
$aliases{$alias} = [ split_addrs($addr) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
# warn on lines that are not recognized
|
|
||||||
else {
|
else {
|
||||||
print STDERR "warning: sendmail line is not recognized: $_\n";
|
print STDERR "warning: sendmail line is not recognized: $_\n";
|
||||||
}}},
|
}}},
|
||||||
|
|||||||
Reference in New Issue
Block a user