[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH 6/9] send-email: simplify sendmail aliases comment and blank line recognizer
From:       Eric Sunshine <sunshine () sunshineco ! com>
Date:       2015-05-31 22:29:28
Message-ID: 1433111371-19573-7-git-send-email-sunshine () sunshineco ! com
[Download RAW message or body]

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

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 git-send-email.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 76bb499..e777bd3 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -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($_);
 	}
 }
-- 
2.4.2.538.g5f4350e

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic