Skip to content

Commit

Permalink
send-email: signedoffcc -> signedoffbycc, but handle both
Browse files Browse the repository at this point in the history
The documentation now mentions sendemail.signedoffbycc instead
of sendemail.signedoffcc in order to match with the options
--signed-off-by-cc; the code has been updated to reflect this
as well, but sendemail.signedoffcc is still handled.

Signed-off-by: Michael Witten <mfwitten@mit.edu>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Michael Witten authored and Shawn O. Pearce committed Oct 1, 2008
1 parent 917f3e7 commit ddc3d4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Documentation/git-send-email.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Automating

--[no-]signed-off-by-cc::
If this is set, add emails found in Signed-off-by: or Cc: lines to the
cc list. Default is the value of 'sendemail.signedoffcc' configuration
cc list. Default is the value of 'sendemail.signedoffbycc' configuration
value; if that is unspecified, default to --signed-off-by-cc.

--suppress-cc::
Expand Down
9 changes: 5 additions & 4 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ sub format_2822_time {
my ($quiet, $dry_run) = (0, 0);

# Variables with corresponding config settings
my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc, $cc_cmd);
my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption);
my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts);
my ($validate);
Expand All @@ -161,7 +161,8 @@ sub format_2822_time {
"thread" => [\$thread, 1],
"chainreplyto" => [\$chain_reply_to, 1],
"suppressfrom" => [\$suppress_from, undef],
"signedoffcc" => [\$signed_off_cc, undef],
"signedoffbycc" => [\$signed_off_by_cc, undef],
"signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated
"validate" => [\$validate, 1],
);

Expand Down Expand Up @@ -225,7 +226,7 @@ sub signal_handler {
"cc-cmd=s" => \$cc_cmd,
"suppress-from!" => \$suppress_from,
"suppress-cc=s" => \@suppress_cc,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_cc,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
"dry-run" => \$dry_run,
"envelope-sender=s" => \$envelope_sender,
"thread!" => \$thread,
Expand Down Expand Up @@ -301,7 +302,7 @@ sub read_config {

# If explicit old-style ones are specified, they trump --suppress-cc.
$suppress_cc{'self'} = $suppress_from if defined $suppress_from;
$suppress_cc{'sob'} = !$signed_off_cc if defined $signed_off_cc;
$suppress_cc{'sob'} = !$signed_off_by_cc if defined $signed_off_by_cc;

# Debugging, print out the suppressions.
if (0) {
Expand Down

0 comments on commit ddc3d4f

Please sign in to comment.