credential-store.c: replace home_config_paths() with xdg_config_home()
[gitweb.git] / git-send-email.perl
index 58c8bc2a59fa0eac8d8f97ca219417183d3725d5..3092ab356c765cd593d2a988d020665c8b626ea1 100755 (executable)
@@ -54,6 +54,7 @@ sub usage {
     --[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 @@ sub format_2822_time {
 # 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 @@ sub do_edit {
     "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 @@ sub signal_handler {
                    "8bit-encoding=s" => \$auto_8bit_encoding,
                    "compose-encoding=s" => \$compose_encoding,
                    "force" => \$force,
+                   "xmailer!" => \$use_xmailer,
         );
 
 usage() if $help;
@@ -1181,8 +1184,10 @@ sub send_message {
 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";