diff options
author | Trent Piepho <tpiepho@freescale.com> | 2008-11-25 18:55:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-26 09:55:10 -0800 |
commit | 73c427eb99a9bb8a3ade40809194405ddb1fd733 (patch) | |
tree | 78954491e6755ea9d0efc087b213f17f99cb60f7 /git-send-email.perl | |
parent | f20706220ba788a40b6634255215ccb87accca70 (diff) | |
download | git-73c427eb99a9bb8a3ade40809194405ddb1fd733.tar.gz |
send-email: Fix Pine address book parsing
See: http://www.washington.edu/pine/tech-notes/low-level.html
Entries with a fcc or comment field after the address weren't parsed
correctly.
Continuation lines, identified by leading spaces, were also not handled.
Distribution lists which had ( ) around a list of addresses did not have
the parenthesis removed.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 94ca5c89ad..007e2c6ee1 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -345,10 +345,13 @@ my %parse_alias = ( # spaces delimit multiple addresses $aliases{$1} = [ split(/\s+/, $2) ]; }}}, - pine => sub { my $fh = shift; while (<$fh>) { - if (/^(\S+)\t.*\t(.*)$/) { + pine => sub { my $fh = shift; my $f='\t[^\t]*'; + for (my $x = ''; defined($x); $x = $_) { + chomp $x; + $x .= $1 while(defined($_ = <$fh>) && /^ +(.*)$/); + $x =~ /^(\S+)$f\t\(?([^\t]+?)\)?(:?$f){0,2}$/ or next; $aliases{$1} = [ split(/\s*,\s*/, $2) ]; - }}}, + }}, gnus => sub { my $fh = shift; while (<$fh>) { if (/\(define-mail-alias\s+"(\S+?)"\s+"(\S+?)"\)/) { $aliases{$1} = [ $2 ]; |