提交 fe87c921 编写于 作者: E Eric W. Biederman 提交者: Junio C Hamano

git-send-email: Handle quotes when parsing .mailrc files

It is legal and not uncommon to use quotes in a .mailrc file so
you can include a persons fullname as well as their email alias.
Handle this by using quotewords instead of split when parsing
.mailrc files.
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 065b0702
......@@ -409,7 +409,7 @@ sub split_addrs {
mailrc => sub { my $fh = shift; while (<$fh>) {
if (/^alias\s+(\S+)\s+(.*)$/) {
# spaces delimit multiple addresses
$aliases{$1} = [ split(/\s+/, $2) ];
$aliases{$1} = [ quotewords('\s+', 0, $2) ];
}}},
pine => sub { my $fh = shift; my $f='\t[^\t]*';
for (my $x = ''; defined($x); $x = $_) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册