summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd9ca0b)
raw | patch | inline | side by side (parent: bd9ca0b)
author | Ryan Anderson <ryan@michonline.com> | |
Mon, 13 Feb 2006 07:57:09 +0000 (02:57 -0500) | ||
committer | Ryan Anderson <ryan@michonline.com> | |
Mon, 13 Feb 2006 08:32:01 +0000 (03:32 -0500) |
Signed-off-by: Ryan Anderson <ryan@michonline.com>
Documentation/git-send-email.txt | patch | blob | history | |
git-send-email.perl | patch | blob | history |
index 00537d8907872aa25c39f07513ef661b1bef1f17..c2f52f58af5868ac2ebcad7259d771a5b578971a 100644 (file)
Only necessary if --compose is also set. If --compose
is not set, this will be prompted for.
+--no-signed-off-by-cc::
+ Do not add emails foudn in Signed-off-by: lines to the cc list.
+
--quiet::
Make git-send-email less verbose. One line per email should be
all that is output.
Only necessary if --compose is also set. If --compose
is not set, this will be prompted for.
+--suppress-from::
+ Do not add the From: address to the cc: list, if it shows up in a From:
+ line.
+
--to::
Specify the primary recipient of the emails generated.
Generally, this will be the upstream maintainer of the
diff --git a/git-send-email.perl b/git-send-email.perl
index 3f1b3ca78897ef1eb85dea266eea6afcc404a1db..abffca51884f54d200706d7671a5ddde5219d50b 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
my (@to,@cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
# Behavior modification variables
-my ($chain_reply_to, $smtp_server, $quiet) = (1, "localhost", 0);
+my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0);
# Example reply to:
#$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';
"smtp-server=s" => \$smtp_server,
"compose" => \$compose,
"quiet" => \$quiet,
+ "suppress-from" => \$suppress_from,
+ "no-signed-off-cc" => \$no_signed_off_cc,
);
# Now, let's fill any that aren't set in with defaults:
email sent, rather than to the first email sent.
Defaults to on.
+ --no-signed-off-cc Suppress the automatic addition of email addresses
+ that appear in a Signed-off-by: line, to the cc: list.
+ Note: Using this option is not recommended.
+
--smtp-server If set, specifies the outgoing SMTP server to use.
Defaults to localhost.
+ --suppress-from Supress sending emails to yourself if your address
+ appears in a From: line.
+
--quiet Make git-send-email less verbose. One line per email should be
all that is output.
-
Error: Please specify a file or a directory on the command line.
EOT
exit(1);
$subject = $1;
} elsif (/^(Cc|From):\s+(.*)$/) {
+ next if ($2 eq $from && $suppress_from);
printf("(mbox) Adding cc: %s from line '%s'\n",
$2, $_) unless $quiet;
push @cc, $2;
}
} else {
$message .= $_;
- if (/^Signed-off-by: (.*)$/i) {
+ if (/^Signed-off-by: (.*)$/i && !$no_signed_off_cc) {
my $c = $1;
chomp $c;
push @cc, $c;