diff options
author | Luis Henriques <henrix@camandro.org> | 2014-03-24 21:38:27 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-15 15:17:25 -0800 |
commit | ac1596a684a44144efa2d52d9104b0d627e6d9a1 (patch) | |
tree | 47d5d041d294cb960f5ab14f472c1b3f994898ea /git-send-email.perl | |
parent | 7fa1365c54c28b3cd9375539f381b54061a1880d (diff) | |
download | git-ac1596a684a44144efa2d52d9104b0d627e6d9a1.tar.gz |
send-email: add --[no-]xmailer option
Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:'
header to the email being sent.
Signed-off-by: Luis Henriques <henrix@camandro.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 9949db01e1..ecd8d6fc12 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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. @@ -148,7 +149,7 @@ my $auth; # 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; @@ -219,7 +220,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 = ( @@ -318,6 +320,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; @@ -1163,8 +1166,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"; |