From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] send-email: address expansion for common mailers
Date: Sat, 25 Mar 2006 18:44:16 -0800 [thread overview]
Message-ID: <20060326024416.GA14234@localdomain> (raw)
In-Reply-To: <7vlkuyt2ku.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
>
> > Two git repo-config keys are required for this
> > (as suggested by Ryan Anderson):
> >
> > sendemail.aliasesfile = <filename of aliases file>
> > sendemail.aliasfiletype = (mutt|gnus|pine|mailrc)
> >
> > I was initially working on auto-detection, but mailrc and mutt formats
> > tend to throw each other off (they're alike, but handle multiple
> > addresses per-alias differently).
>
> I think specifying the type explicitly is probably not too much
> hassle for the end user, so that is fine. Now, do we want to
> support more than one aliases file?
If they're different types, probably not. But if it's the same type,
it's pretty easy and I don't see why not. This patch applies on top
of the previous one.
Subject: [PATCH] send-email: allow more than one alias file to be used
The aliasfiletype must be the same for all aliasesfiles, though.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-send-email.perl | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
16306f761b34505672a04bff333d6342724756c8
diff --git a/git-send-email.perl b/git-send-email.perl
index d3e1768..5d1e95c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -90,7 +90,7 @@ my ($author) = gitvar_ident('GIT_AUTHOR_
my ($committer) = gitvar_ident('GIT_COMMITTER_IDENT');
my %aliases;
-chomp(my $aliases_file = `git-repo-config sendemail.aliasesfile`);
+chomp(my @alias_files = `git-repo-config --get-all sendemail.aliasesfile`);
chomp(my $aliasfiletype = `git-repo-config sendemail.aliasfiletype`);
my %parse_alias = (
# multiline formats can be supported in the future
@@ -116,10 +116,12 @@ my %parse_alias = (
}}}
);
-if ($aliases_file && defined $parse_alias{$aliasfiletype}) {
- open my $fh, '<', $aliases_file or die "opening $aliases_file: $!\n";
- $parse_alias{$aliasfiletype}->($fh);
- close $fh;
+if (@alias_files && defined $parse_alias{$aliasfiletype}) {
+ foreach my $file (@alias_files) {
+ open my $fh, '<', $file or die "opening $file: $!\n";
+ $parse_alias{$aliasfiletype}->($fh);
+ close $fh;
+ }
}
my $prompting = 0;
--
1.2.4.gb622a
next prev parent reply other threads:[~2006-03-26 2:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 10:43 send-email: dependency removal, cleanup, + small feature Eric Wong
2006-03-25 10:43 ` [PATCH 1/4] send-email: Change from Mail::Sendmail to Net::SMTP Eric Wong
2006-03-25 23:58 ` Ryan Anderson
2006-03-26 0:54 ` Eric Wong
2006-03-26 1:09 ` Junio C Hamano
2006-03-26 1:20 ` [PATCH] " Eric Wong
2006-04-26 0:45 ` Martin Langhoff
2006-04-26 20:17 ` Junio C Hamano
2006-04-26 20:24 ` Martin Langhoff
2006-04-28 0:27 ` Eric Wong
2006-04-28 1:04 ` Martin Langhoff
2006-03-25 10:43 ` [PATCH 2/4] send-email: use built-in time() instead of /bin/date '+%s' Eric Wong
2006-03-25 10:43 ` [PATCH 3/4] send-email: lazy-load Email::Valid and make it optional Eric Wong
2006-03-25 15:07 ` Randal L. Schwartz
2006-03-25 20:33 ` Junio C Hamano
2006-03-26 0:47 ` [PATCH] " Eric Wong
2006-03-25 10:43 ` [PATCH 4/4] send-email: add support for mutt aliases files Eric Wong
2006-03-25 20:31 ` Junio C Hamano
2006-03-25 23:50 ` Ryan Anderson
2006-03-26 1:10 ` [PATCH] send-email: address expansion for common mailers Eric Wong
2006-03-26 1:30 ` Junio C Hamano
2006-03-26 2:44 ` Eric Wong [this message]
2006-05-15 2:13 ` [PATCH (resend)] " Eric Wong
2006-05-15 4:12 ` Ryan Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060326024416.GA14234@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox