git-send-email: allow leading white space on mutt aliases
authorMichael Hendricks <michael@ndrix.org>
Thu, 17 May 2007 05:15:16 +0000 (23:15 -0600)
committerJunio C Hamano <junkio@cox.net>
Thu, 17 May 2007 05:33:04 +0000 (22:33 -0700)
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 <michael@ndrix.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl
index 12ced288857c7531f964d2e08e9a7c3cc1136dbd..e60d8777f0a14234c1b695b08e37ae173dd48d26 100755 (executable)
@@ -212,7 +212,7 @@ sub format_2822_time {
 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