send-email: simplify sendmail aliases comment and blank line recognizer

Replace unnecessarily complex regular expression for recognizing comment
and blank lines in sendmail aliases with idiomatic expressions which
can be easily understood at a glance.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric Sunshine 2015-05-31 18:29:28 -04:00 коммит произвёл Junio C Hamano
Родитель 09f1157bbf
Коммит 020be85f51
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -505,7 +505,7 @@ sub parse_sendmail_alias {
sub parse_sendmail_aliases { sub parse_sendmail_aliases {
my $fh = shift; my $fh = shift;
while (<$fh>) { while (<$fh>) {
if (/^\s*(?:#.*)?$/) { next; } next if /^\s*$/ || /^\s*#/;
parse_sendmail_alias($_); parse_sendmail_alias($_);
} }
} }