@matheusbsbs / matheus-bagliano / commits / 5806324589
Fork 0

Add support for --bcc to git-send-email.

Signed-off-by: Ryan Anderson <rda@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Ryan Anderson committed May 29, 2006 at 12:30 UTC 580632458902b440cba41f0a5a1d27192221e1b9
1 file changed +8 -2
git-send-email.perl
+8 -2
@@ -37,7 +37,8 @@ sub cleanup_compose_files();
37 my $compose_filename = ".msg.$$";
38
39 # Variables we fill in automatically, or via prompting:
40 -my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time);
40 +my (@to,@cc,@initial_cc,@bcclist,
41 + $initial_reply_to,$initial_subject,@files,$from,$compose,$time);
42
43 # Behavior modification variables
44 my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc) = (1, 0, 0, 0);
@@ -56,6 +57,7 @@ my $rc = GetOptions("from=s" => \$from,
57 "subject=s" => \$initial_subject,
58 "to=s" => \@to,
59 "cc=s" => \@initial_cc,
60 + "bcc=s" => \@bcclist,
61 "chain-reply-to!" => \$chain_reply_to,
62 "smtp-server=s" => \$smtp_server,
63 "compose" => \$compose,
@@ -160,6 +162,7 @@ sub expand_aliases {
162
163 @to = expand_aliases(@to);
164 @initial_cc = expand_aliases(@initial_cc);
165 +@bcclist = expand_aliases(@bcclist);
166
167 if (!defined $initial_subject && $compose) {
168 do {
@@ -269,6 +272,9 @@ Options:
272 --cc Specify an initial "Cc:" list for the entire series
273 of emails.
274
275 + --bcc Specify a list of email addresses that should be Bcc:
276 + on all the emails.
277 +
278 --compose Use \$EDITOR to edit an introductory message for the
279 patch series.
280
@@ -348,7 +354,7 @@ sub send_message
354 {
355 my @recipients = unique_email_list(@to);
356 my $to = join (",\n\t", @recipients);
351 - @recipients = unique_email_list(@recipients,@cc);
357 + @recipients = unique_email_list(@recipients,@cc,@bcclist);
358 my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++));
359 my $gitversion = '@@GIT_VERSION@@';
360 if ($gitversion =~ m/..GIT_VERSION../) {