All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <henrix@camandro.org>
To: "Kyle J. McKay" <mackyle@gmail.com>
Cc: Eric Wong <normalperson@yhbt.net>, git@vger.kernel.org
Subject: Re: [RFC][PATCH] send-email: add --[no-]xmailer option
Date: Wed, 3 Dec 2014 10:13:45 +0000	[thread overview]
Message-ID: <20141203101344.GA2809@charon.olymp> (raw)
In-Reply-To: <CE4526D6-F223-4FD8-A66E-F39D85E843B2@gmail.com>

On Tue, Dec 02, 2014 at 07:22:10PM -0800, Kyle J. McKay wrote:
> On Dec 2, 2014, at 18:34, Eric Wong wrote:
> 
> >Luis Henriques <henrix@camandro.org> wrote:
> >>On Mon, Mar 24, 2014 at 09:38:27PM +0000, Luis Henriques wrote:
> >>>Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:'
> >>>header to the email being sent.
> >>>
> >>
> >>Ping
> >>
> >>It's been a while since I sent this patch.  Is there any interest in
> >>having this switch in git-send-email?
> >
> >I wasn't paying attention when the original was sent, but this
> >looks good to me.
> >
> >Acked-by: Eric Wong <normalperson@yhbt.net>
> >
> >>I honestly don't like disclosing too much information about my system,
> >>in this case which MUA I'm using and its version.
> >
> >Right on.  I would even favor this being the default.
> 
> I fully agree with you.
> 
> >Auto-generated Message-Id headers also shows the use of git-send-email;
> >perhaps there can be a way to configure that, too.  However,
> >git-send-email respects manually-added Message-Id headers in the
> >original patch, so it's less of a problem, I suppose.
> 
> It can be hashed like so to avoid leaking information:

Awesome, I like this idea too!

Cheers,
-- 
Luís

> 
> diff --git a/git-send-email.orig b/git-send-email.new
> index f3d75e8..d0b4bff 100755
> --- a/git-send-email.orig
> +++ b/git-send-email.new
> @@ -27,6 +27,7 @@ use Data::Dumper;
>  use Term::ANSIColor;
>  use File::Temp qw/ tempdir tempfile /;
>  use File::Spec::Functions qw(catfile);
> +use Digest::MD5 qw(md5_hex);
>  use Error qw(:try);
>  use Git;
> 
> @@ -901,8 +903,10 @@ sub make_message_id {
>  		require Sys::Hostname;
>  		$du_part = 'user@' . Sys::Hostname::hostname();
>  	}
> -	my $message_id_template = "<%s-git-send-email-%s>";
> +	my $message_id_template = "%s-git-send-email-%s";
>  	$message_id = sprintf($message_id_template, $uniq, $du_part);
> +	@_ = split /@/, $message_id;
> +	$message_id = '<'.substr(md5_hex($_[0]),0,31).'@'.substr(md5_hex($_[1]),1,31).'>';
>  	#print "new message id = $message_id\n"; # Was useful for debugging
>  }
> 
> ---
> 
> --Kyle

  reply	other threads:[~2014-12-03 10:14 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 [this message]
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

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=20141203101344.GA2809@charon.olymp \
    --to=henrix@camandro.org \
    --cc=git@vger.kernel.org \
    --cc=mackyle@gmail.com \
    --cc=normalperson@yhbt.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.