Subject: [PATCH] git-send-email: allow leading white space on mutt aliases

From: Michael Hendricks <[email-masked]>
Date: Wed, 16 May 2007 23:15:16 -0600

mutt version 1.5.14 (perhaps earlier versions too) permits alias files to have
white space before the 'alias' keyword.

Signed-off-by: Michael Hendricks <[email-masked]>
---
 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 404095f..eb876f8 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -212,7 +212,7 @@ my $aliasfiletype = $repo->config('sendemail.aliasfiletype');
 my %parse_alias = (
 	# multiline formats can be supported in the future
 	mutt => sub { my $fh = shift; while (<$fh>) {
-		if (/^alias\s+(\S+)\s+(.*)$/) {
+		if (/^\s*alias\s+(\S+)\s+(.*)$/) {
 			my ($alias, $addr) = ($1, $2);
 			$addr =~ s/#.*$//; # mutt allows # comments
 			 # commas delimit multiple addresses
-- 
1.5.2.rc3.39.gaf9b-dirty