git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] - git-send-email.perl

From
Joe Perches <joe@perches.com>
Date
Aug 17, 2007, 17:54 UTC
Message-ID
<1187373278.822.100.camel@localhost>
In-Reply-To
<1187317826.822.23.camel@localhost>

Here's a path to enable a command line option that takes a string argument

	cc-cmd

This modifies the @cc array to include whatever output is produced by cc_cmd $patchfile

cccmd can be stored in a config settings file

previous versions of this patch were submitted against an older version of git-send-email.perl

diff --git a/git-send-email.perl b/git-send-email.perl
index 69559b2..828a77a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -46,6 +46,9 @@ Options:
    --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.
 
@@ -157,13 +160,14 @@ if ($@) {
 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) {
@@ -189,6 +193,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
 		    "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,
@@ -652,11 +657,21 @@ foreach my $t (@files) {
 		}
 	}
 	close F;
+
+	if (${cc_cmd} ne "") {
+	    my $output = `${cc_cmd} $t`;
+	    my @lines = split("\n", $output);
+	    foreach my $c (@lines) {
+		push @cc, $c;
+		printf("(cc-cmd) Adding cc: %s from: '%s'\n", $c, $cc_cmd)
+		    unless $quiet;
+	    }
+	}
+
 	if (defined $author) {
 		$message = "From: $author\n\n$message";
 	}
 
-
 	send_message();
 
 	# set up for the next message
Previous: Joe PerchesNext: Junio C Hamano
Message 36 of 38 in “Re: [PATCH] [1/2many] - FInd the maintainer(s) for a patch - scripts/get_maintainer.pl”
  1. Joe PerchesAug 14, 2007
  2. Rene HermanAug 14, 2007
  3. Joe PerchesAug 14, 2007
  4. Rene HermanAug 14, 2007
  5. Linus TorvaldsAug 14, 2007
  6. Joe PerchesAug 14, 2007
  7. Al ViroAug 14, 2007
  8. Joe PerchesAug 14, 2007
  9. Rene HermanAug 15, 2007
  10. Satyam SharmaAug 15, 2007
  11. Rene HermanAug 15, 2007
  12. Kyle MoffettAug 15, 2007
  13. Rene HermanAug 16, 2007
  14. Rene HermanAug 16, 2007
  15. Salikh ZakirovAug 16, 2007
  16. Rene HermanAug 16, 2007
  17. Al ViroAug 16, 2007
  18. Rene HermanAug 16, 2007
  19. Junio C HamanoAug 16, 2007
  20. Rene HermanAug 17, 2007
  21. Krzysztof HalasaAug 15, 2007
  22. Al ViroAug 15, 2007
  23. Richard KnutssonAug 15, 2007
  24. Stefan RichterAug 15, 2007
  25. Ray LeeAug 15, 2007
  26. Joe PerchesAug 16, 2007
  27. Junio C HamanoAug 15, 2007
  28. Joe PerchesAug 15, 2007
  29. Junio C HamanoAug 15, 2007
  30. Rene HermanAug 15, 2007
  31. Stefan RichterAug 15, 2007
  32. Rene HermanAug 15, 2007
  33. Joe PerchesAug 15, 2007
  34. Joe PerchesAug 17, 2007
  35. Joe PerchesAug 17, 2007
  36. - git-send-email.perlJoe Perches, Aug 17, 2007
  37. Junio C HamanoAug 17, 2007
  38. Joe PerchesAug 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.