Merge branch 'lh/send-email-hide-x-mailer'
"git send-email" normally identifies itself via X-Mailer: header in the message it sends out. A new command line flag allows the user to squelch the header. * lh/send-email-hide-x-mailer: test/send-email: --[no-]xmailer tests send-email: add --[no-]xmailer option
This commit is contained in:
@ -54,6 +54,7 @@ git send-email [options] <file | directory | rev-list options >
|
||||
--[no-]bcc <str> * Email Bcc:
|
||||
--subject <str> * Email "Subject:"
|
||||
--in-reply-to <str> * Email "In-Reply-To:"
|
||||
--[no-]xmailer * Add "X-Mailer:" header (default).
|
||||
--[no-]annotate * Review each patch that will be sent in an editor.
|
||||
--compose * Open an editor for introduction.
|
||||
--compose-encoding <str> * Encoding to assume for introduction.
|
||||
@ -154,7 +155,7 @@ my $re_encoded_word = qr/=\?($re_token)\?($re_token)\?($re_encoded_text)\?=/;
|
||||
# Variables we fill in automatically, or via prompting:
|
||||
my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
|
||||
$initial_reply_to,$initial_subject,@files,
|
||||
$author,$sender,$smtp_authpass,$annotate,$compose,$time);
|
||||
$author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time);
|
||||
|
||||
my $envelope_sender;
|
||||
|
||||
@ -226,7 +227,8 @@ my %config_bool_settings = (
|
||||
"signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated
|
||||
"validate" => [\$validate, 1],
|
||||
"multiedit" => [\$multiedit, undef],
|
||||
"annotate" => [\$annotate, undef]
|
||||
"annotate" => [\$annotate, undef],
|
||||
"xmailer" => [\$use_xmailer, 1]
|
||||
);
|
||||
|
||||
my %config_settings = (
|
||||
@ -327,6 +329,7 @@ my $rc = GetOptions("h" => \$help,
|
||||
"8bit-encoding=s" => \$auto_8bit_encoding,
|
||||
"compose-encoding=s" => \$compose_encoding,
|
||||
"force" => \$force,
|
||||
"xmailer!" => \$use_xmailer,
|
||||
);
|
||||
|
||||
usage() if $help;
|
||||
@ -1181,8 +1184,10 @@ To: $to${ccline}
|
||||
Subject: $subject
|
||||
Date: $date
|
||||
Message-Id: $message_id
|
||||
X-Mailer: git-send-email $gitversion
|
||||
";
|
||||
if ($use_xmailer) {
|
||||
$header .= "X-Mailer: git-send-email $gitversion\n";
|
||||
}
|
||||
if ($reply_to) {
|
||||
|
||||
$header .= "In-Reply-To: $reply_to\n";
|
||||
|
||||
Reference in New Issue
Block a user