зеркало из https://github.com/microsoft/git.git
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:
Родитель
09f1157bbf
Коммит
020be85f51
|
@ -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($_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче