From: Luis Henriques <henrix@camandro.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC][PATCH] send-email: add --[no-]xmailer option
Date: Wed, 3 Dec 2014 18:02:48 +0000 [thread overview]
Message-ID: <20141203180248.GA3362@charon.olymp> (raw)
In-Reply-To: <xmqq388wk5q8.fsf@gitster.dls.corp.google.com>
On Wed, Dec 03, 2014 at 09:23:11AM -0800, Junio C Hamano wrote:
> 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.
>
Awesome, thank you for your review. I'll post a new version of the
patch including your suggestions. Regarding the tests, I'll need a
bit more time to work on those.
Cheers,
--
Luís
> 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
>
prev parent reply other threads:[~2014-12-03 18:02 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
2014-12-03 17:39 ` Junio C Hamano
2014-12-03 18:02 ` Luis Henriques [this message]
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=20141203180248.GA3362@charon.olymp \
--to=henrix@camandro.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).