git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Michael Hendricks <michael@ndrix.org>
Date
May 17, 2007, 05:15 UTC
Message-ID
<1179378916698-git-send-email-michael@ndrix.org>

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>
---
 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
Message 1 of 1 in “git-send-email: allow leading white space on mutt aliases”
  1. git-send-email: allow leading white space on mutt aliasesMichael Hendricks, May 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.