From: Junio C Hamano <gitster@pobox•com>
To: Luis Henriques <henrix@camandro•org>
Cc: git@vger•kernel.org
Subject: Re: [RFC][PATCH] send-email: add --[no-]xmailer option
Date: Wed, 03 Dec 2014 09:23:11 -0800 [thread overview]
Message-ID: <xmqq388wk5q8.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqfvcwk6en.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Wed, 03 Dec 2014 09:08:32 -0800")
Junio C Hamano <gitster@pobox•com> writes:
> Two problems here.
> ...
> tests?
Something like this squashed into the patch you posted earlier,
perhaps, would be a good place to start.
Documentation/git-send-email.txt | 6 ++++--
git-send-email.perl | 11 +++++------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index f2425ef..a0bd806 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -132,8 +132,10 @@ Note that no attempts whatsoever are made to validate the encoding.
'sendemail.composeencoding'; if that is unspecified, UTF-8 is assumed.
--xmailer::
- Prevent adding the "X-Mailer:" header. Default value is
- 'sendemail.xmailer'.
+--no-xmailer::
+ Add (or prevent adding) the "X-Mailer:" header. By default,
+ the header is added, but it can be turned off by setting the
+ `sendemail.xmailer` configuration variable to `false`.
Sending
~~~~~~~
diff --git a/git-send-email.perl b/git-send-email.perl
index 9ca7c5b..a6e66b9 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -54,7 +54,7 @@ sub usage {
--[no-]bcc <str> * Email Bcc:
--subject <str> * Email "Subject:"
--in-reply-to <str> * Email "In-Reply-To:"
- --[no-]xmailer * Don't add "X-Mailer:" header. Default on.
+ --[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.
@@ -177,8 +177,7 @@ sub format_2822_time {
my $multiedit;
my $editor;
-# Usage of X-Mailer email header
-my $xmailer;
+my $use_xmailer;
sub do_edit {
if (!defined($editor)) {
@@ -224,7 +223,7 @@ sub do_edit {
"validate" => [\$validate, 1],
"multiedit" => [\$multiedit, undef],
"annotate" => [\$annotate, undef],
- "xmailer" => [\$xmailer, 1]
+ "xmailer" => [\$use_xmailer, 1]
);
my %config_settings = (
@@ -323,7 +322,7 @@ sub signal_handler {
"8bit-encoding=s" => \$auto_8bit_encoding,
"compose-encoding=s" => \$compose_encoding,
"force" => \$force,
- "xmailer!" => \$xmailer,
+ "xmailer!" => \$use_xmailer,
);
usage() if $help;
@@ -1170,7 +1169,7 @@ sub send_message {
Date: $date
Message-Id: $message_id
";
- if ($xmailer) {
+ if ($use_xmailer) {
$header .= "X-Mailer: git-send-email $gitversion\n";
}
if ($reply_to) {
--
2.2.0-141-gd3f4719
next prev parent reply other threads:[~2014-12-03 17:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 21:38 [RFC][PATCH] send-email: add --[no-]xmailer option Luis Henriques
2014-12-02 19:32 ` Luis Henriques
2014-12-03 2:34 ` Eric Wong
2014-12-03 3:22 ` Kyle J. McKay
2014-12-03 10:13 ` Luis Henriques
2014-12-03 16:56 ` Junio C Hamano
2014-12-04 19:22 ` Luis Henriques
2014-12-04 19:33 ` Junio C Hamano
2014-12-04 19:44 ` Luis Henriques
2014-12-03 17:08 ` Junio C Hamano
2014-12-03 17:23 ` Junio C Hamano [this message]
2014-12-03 17:39 ` Junio C Hamano
2014-12-03 18:02 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq388wk5q8.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=henrix@camandro$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox