send-email: simplify sendmail aliases comment and blank line recognizer
authorEric Sunshine <sunshine@sunshineco.com>
Sun, 31 May 2015 22:29:28 +0000 (18:29 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Jun 2015 22:53:03 +0000 (15:53 -0700)
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>
git-send-email.perl
index 76bb499fbbb3d99b9d5a6a378586c31bce838db2..e777bd3a60b16f735733df8d30e9e6b273857f2e 100755 (executable)
@@ -505,7 +505,7 @@ sub parse_sendmail_alias {
 sub parse_sendmail_aliases {
        my $fh = shift;
        while (<$fh>) {
-               if (/^\s*(?:#.*)?$/) { next; }
+               next if /^\s*$/ || /^\s*#/;
                parse_sendmail_alias($_);
        }
 }