From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Subject: Re: I need a `git format-patch --attach-complete' for RT Date: Thu, 29 Apr 2010 10:16:30 +0000 Message-ID: References: <4BD93465.60507@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Git Mailing List To: Paolo Bonzini X-From: git-owner@vger.kernel.org Fri Apr 30 20:17:11 2010 connect(): No such file or directory Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O7uly-0004j9-86 for gcvg-git-2@lo.gmane.org; Fri, 30 Apr 2010 20:17:10 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933026Ab0D3SRA convert rfc822-to-quoted-printable (ORCPT ); Fri, 30 Apr 2010 14:17:00 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:63202 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759194Ab0D3SQu convert rfc822-to-8bit (ORCPT ); Fri, 30 Apr 2010 14:16:50 -0400 Received: by bwz19 with SMTP id 19so298198bwz.21 for ; Fri, 30 Apr 2010 11:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=TCsThNxSIxDU0t/ixwmqYYiI/Jtq6vMLlPZQvZKIc2Q=; b=mLjcq6sbOGDk1fdGnuet2/pB2gH+mSfTwl45mULdW5krTljzX46DFzr52DR0FPTNbU Zlsd4/vOUm/mpzSqZe3XgWG9GdRggiYKJzwEa0eT+WeUoeETXEx0OmJ/WY8fsnBXZgHZ werVHSxnHdy62ubeiZwKDuQknNkJ1HckvzzkQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cpU++sq46VA6LOVGuNrYc9xlGX4jWU8CIkTajp0OTezK8gjXROAiaIwUXPaOx1Zc/0 FohvHy6+qFOeF/DhMdgI9vNmQ1Q9N/u+AaTC7ZVtRWQI47CdUtL4XJrfLSonnrjqhhqV W96nWjCkSABcOvgXK/z8fBOvfKM0JrDRHezJA= Received: by 10.204.161.211 with SMTP id s19mr5693440bkx.129.1272536190601; Thu, 29 Apr 2010 03:16:30 -0700 (PDT) Received: by 10.204.65.144 with HTTP; Thu, 29 Apr 2010 03:16:30 -0700 (PDT) In-Reply-To: <4BD93465.60507@gnu.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Apr 29, 2010 at 07:25, Paolo Bonzini wrote: > On 04/21/2010 02:22 PM, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: >> >> I'm working with a system that doesn't play nice with git-format-pat= ch >> / git-send-email. When you send mail to RT (e.g. http://rt.perl.org/= ) >> it'll always munge the original E-Mail, so inline patches won't >> work. [...]It would be nicer if I could instead: >> >> =C2=A0 =C2=A0 git format-patch --attach-complete origin.. >> =C2=A0 =C2=A0 git send-email *.patch > > This is a bit underspecified. =C2=A0What should the subject be? =C2=A0= Do you want to > have something like --cover-letter but placing the messages after 00/= NN in > an attachment? It should work exactly as if though you'd taken the *.patch file generated by `git format-patch a..b` and attached it as a MIME attachment in your mailer. The subject of the E-Mail itself should be the same I want it to work exactly like `git format-patch` does, except it should attach the patch as a multipart MIME part. The content of the message itself (a text/plain MIME part) should be the same as now, except it should skip the actual patch. Here's an example of how it should look, generated by GMail: MIME-Version: 1.0 Date: Thu, 29 Apr 2010 10:00:18 +0000 Subject: [PATCH] Don't ask the porters to fetch commits from a priv= ate URL From: =3D?UTF-8?q?=3DC3=3D86var=3D20Arnfj=3DC3=3DB6r=3DC3=3DB0=3D20= Bjarmason?=3D Content-Type: multipart/mixed; boundary=3D00163649a453b0a1ef04855d3= 190 --00163649a453b0a1ef04855d3190 Content-Type: text/plain; charset=3DUTF-8 git@github.com:USERNAME/perl.git is only accessible to USERNAME (or collaborators), git://github.com/USERNAME/perl.git is available to everyone. --- See the attached patch for the changes described in the diffstat be= low. pod/perlrepository.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --00163649a453b0a1ef04855d3190 Content-Type: text/x-patch; charset=3DUS-ASCII; name=3D"0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.p= atch" Content-Disposition: attachment; filename=3D"0001-Don-t-ask-the-porters-to-fetch-commits-from-a-priv= at.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g8lej0oz0 RnJvbSBmYjYwZTc0NWZkYWI2YzNkZjNkMjU0YjRjMmE2OTM5MzA3ZDNmOGE3IE1vbiB= TZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/PUMzPTg2dmFyPTIwQXJuZmo9QzM= 9QjZyPUMz PUIwPTIwQmphcm1hc29uPz0gPGF2YXJAY3Bhbi5vcmc+CkRhdGU6IFR1ZSwgMjAgQXB= yIDIwMTAg MTk6Mjg6MDEgKzAwMDAKU3ViamVjdDogW1BBVENIXSBEb24ndCBhc2sgdGhlIHBvcnR= lcnMgdG8g ZmV0Y2ggY29tbWl0cyBmcm9tIGEgcHJpdmF0ZSBVUkwKCmdpdEBnaXRodWIuY29tOlV= TRVJOQU1F L3BlcmwuZ2l0IGlzIG9ubHkgYWNjZXNzaWJsZSB0byBVU0VSTkFNRSAob3IKY29sbGF= ib3JhdG9y cyksIGdpdDovL2dpdGh1Yi5jb20vVVNFUk5BTUUvcGVybC5naXQgaXMgYXZhaWxhYmx= lIHRvCmV2 ZXJ5b25lLgotLS0KIHBvZC9wZXJscmVwb3NpdG9yeS5wb2QgfCAgICAyICstCiAxIGZ= pbGVzIGNo YW5nZWQsIDEgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQ= gYS9wb2Qv cGVybHJlcG9zaXRvcnkucG9kIGIvcG9kL3BlcmxyZXBvc2l0b3J5LnBvZAppbmRleCA= wMGRiYmZh Li5jYzg3YmRlIDEwMDY0NAotLS0gYS9wb2QvcGVybHJlcG9zaXRvcnkucG9kCisrKyB= iL3BvZC9w ZXJscmVwb3NpdG9yeS5wb2QKQEAgLTc1Nyw3ICs3NTcsNyBAQCBlbWFpbCAoc2VlIEw= 8L1NVQk1J VFRJTkcgQSBQQVRDSD4pIHdpdGggYSBkZXNjcmlwdGlvbiBvZiB5b3VyIGNoYW5nZXM= KIGFuZCB0 aGUgZm9sbG93aW5nIGluZm9ybWF0aW9uOgogCiAgIGh0dHA6Ly9naXRodWIuY29tL1V= TRVJOQU1F L3BlcmwvdHJlZS9vcmFuZ2UKLSAgZ2l0QGdpdGh1Yi5jb206VVNFUk5BTUUvcGVybC5= naXQgYnJh bmNoIG9yYW5nZQorICBnaXQ6Ly9naXRodWIuY29tL1VTRVJOQU1FL3BlcmwuZ2l0IGJ= yYW5jaCBv cmFuZ2UKIAogPWhlYWQxIE1lcmdpbmcgZnJvbSBhIGJyYW5jaCB2aWEgR2l0SHViCiA= KLS0gCjEu Ny4xLnJjMQoK --00163649a453b0a1ef04855d3190-- =46or comparison this is what `git format-patch a..b` will give me now: From fb60e745fdab6c3df3d254b4c2a6939307d3f8a7 Mon Sep 17 00:00:00 2= 001 From: =3D?UTF-8?q?=3DC3=3D86var=3D20Arnfj=3DC3=3DB6r=3DC3=3DB0=3D20= Bjarmason?=3D Date: Tue, 20 Apr 2010 19:28:01 +0000 Subject: [PATCH] Don't ask the porters to fetch commits from a priv= ate URL git@github.com:USERNAME/perl.git is only accessible to USERNAME (or collaborators), git://github.com/USERNAME/perl.git is available to everyone. --- pod/perlrepository.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod index 00dbbfa..cc87bde 100644 --- a/pod/perlrepository.pod +++ b/pod/perlrepository.pod @@ -757,7 +757,7 @@ email (see L) with a description of your changes and the following information: http://github.com/USERNAME/perl/tree/orange - git@github.com:USERNAME/perl.git branch orange + git://github.com/USERNAME/perl.git branch orange =3Dhead1 Merging from a branch via GitHub -- 1.7.1.rc1 And this is what `git format-patch --attach a..b` gives you. It just attaches the patch (`git diff`). Not its commit message: From: =3D?UTF-8?q?=3DC3=3D86var=3D20Arnfj=3DC3=3DB6r=3DC3=3DB0=3D20= Bjarmason?=3D Date: Tue, 20 Apr 2010 19:28:01 +0000 Subject: [PATCH] Don't ask the porters to fetch commits from a priv= ate URL Date: Wed, 21 Apr 2010 11:48:19 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=3D"------------1.7.1.rc1" From: =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason This is a multi-part message in MIME format. --------------1.7.1.rc1 Content-Type: text/plain; charset=3DUTF-8; format=3Dfixed Content-Transfer-Encoding: 8bit git@github.com:USERNAME/perl.git is only accessible to USERNAME (or collaborators), git://github.com/USERNAME/perl.git is available to everyone. --- pod/perlrepository.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --------------1.7.1.rc1 Content-Type: text/x-patch; name=3D"0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.patch= " Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename=3D"0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.p= atch" diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod index 7dd4c25..15809dc 100644 --- a/pod/perlrepository.pod +++ b/pod/perlrepository.pod @@ -757,7 +757,7 @@ email (see L) with a description of your changes and the following information: http://github.com/USERNAME/perl/tree/orange - git@github.com:USERNAME/perl.git branch orange + git://github.com/USERNAME/perl.git branch orange =3Dhead1 Merging from a branch via GitHub --------------1.7.1.rc1-- > It seems easiest to write a small filter in Perl, but it could be add= ed as > an option to git-format-patch, maybe something like > --cover-letter=3Dattach-all. Yeah it'd be easiest to write one in Perl, but it would have to be in core so you could tell random contributors to send patches with the built-in tools using the new option easily. The relevant bits in builtin/log.c are scary :) With other projects I don't think I'll be patching it myself very soon (if ever). But I'd be very thankful if someone would code this up. It would be very useful for projects with silly Email-to-Bugtracker gateways. A lot of silly E-Mail system will destroy inline content, but they generally leave MIME attachments alone.