Skip to content

Commit 7613ea3

Browse files
wfp5pgitster
authored andcommitted
Add parsing of elm aliases to git-send-email
elm stores a text file version of the aliases that is <alias> = <comment> = <email address> This adds the parsing of this file to git-send-email Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7bd93c1 commit 7613ea3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Documentation/git-send-email.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ sendemail.aliasesfile::
262262

263263
sendemail.aliasfiletype::
264264
Format of the file(s) specified in sendemail.aliasesfile. Must be
265-
one of 'mutt', 'mailrc', 'pine', or 'gnus'.
265+
one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'.
266266

267267
sendemail.multiedit::
268268
If true (default), a single editor instance will be spawned to edit

git-send-email.perl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,14 @@ sub split_addrs {
418418
$x =~ /^(\S+)$f\t\(?([^\t]+?)\)?(:?$f){0,2}$/ or next;
419419
$aliases{$1} = [ split_addrs($2) ];
420420
}},
421+
elm => sub { my $fh = shift;
422+
while (<$fh>) {
423+
if (/^(\S+)\s+=\s+[^=]+=\s(\S+)/) {
424+
my ($alias, $addr) = ($1, $2);
425+
$aliases{$alias} = [ split_addrs($addr) ];
426+
}
427+
} },
428+
421429
gnus => sub { my $fh = shift; while (<$fh>) {
422430
if (/\(define-mail-alias\s+"(\S+?)"\s+"(\S+?)"\)/) {
423431
$aliases{$1} = [ $2 ];

0 commit comments

Comments
 (0)