summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9ab200)
raw | patch | inline | side by side (parent: a9ab200)
author | Joe Perches <joe@perches.com> | |
Sat, 18 Aug 2007 01:51:12 +0000 (18:51 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 18 Aug 2007 02:03:32 +0000 (19:03 -0700) |
This new option allows an arbitrary "cmd" to generate per patch
file specific "Cc:"s.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
file specific "Cc:"s.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-send-email.txt | patch | blob | history | |
git-send-email.perl | patch | blob | history |
index d243ed1e3a3c4f3e94d01b076e7715d37a1cd204..a63a3adab09a1563908114903ff1a6d82196ed97 100644 (file)
+
The --cc option must be repeated for each user you want on the cc list.
+--cc-cmd::
+ Specify a command to execute once per patch file which
+ should generate patch file specific "Cc:" entries.
+ Output of this command must be single email address per line.
+ Default is the value of 'sendemail.cccmd' configuration value.
+
--chain-reply-to, --no-chain-reply-to::
If this is set, each email will be sent as a reply to the previous
email sent. If disabled with "--no-chain-reply-to", all emails after
Format of the file(s) specified in sendemail.aliasesfile. Must be
one of 'mutt', 'mailrc', 'pine', or 'gnus'.
+sendemail.cccmd::
+ Command to execute to generate per patch file specific "Cc:"s.
+
sendemail.bcc::
Email address (or alias) to always bcc.
diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b289a28acf7fd095260797535f62db8172e..4767249e6d9ef25a6618e99a2557cd909be1573c 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
--cc Specify an initial "Cc:" list for the entire series
of emails.
+ --cc-cmd Specify a command to execute per file which adds
+ per file specific cc address entries
+
--bcc Specify a list of email addresses that should be Bcc:
on all the emails.
my ($quiet, $dry_run) = (0, 0);
# Variables with corresponding config settings
-my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc);
+my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my %config_settings = (
"thread" => [\$thread, 1],
"chainreplyto" => [\$chain_reply_to, 1],
"suppressfrom" => [\$suppress_from, 0],
"signedoffcc" => [\$signed_off_cc, 1],
+ "cccmd" => [\$cc_cmd, ""],
);
foreach my $setting (keys %config_settings) {
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
"quiet" => \$quiet,
+ "cc-cmd=s" => \$cc_cmd,
"suppress-from!" => \$suppress_from,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_cc,
"dry-run" => \$dry_run,
}
}
close F;
+
+ if ($cc_cmd ne "") {
+ open(F, "$cc_cmd $t |")
+ or die "(cc-cmd) Could not execute '$cc_cmd'";
+ while(<F>) {
+ my $c = $_;
+ $c =~ s/^\s*//g;
+ $c =~ s/\n$//g;
+ push @cc, $c;
+ printf("(cc-cmd) Adding cc: %s from: '%s'\n",
+ $c, $cc_cmd) unless $quiet;
+ }
+ close F
+ or die "(cc-cmd) failed to close pipe to '$cc_cmd'";
+ }
+
if (defined $author) {
$message = "From: $author\n\n$message";
}
-
send_message();
# set up for the next message