From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: I need a `git format-patch --attach-complete' for RT
Date: Thu, 29 Apr 2010 10:16:30 +0000 [thread overview]
Message-ID: <u2v51dd1af81004290316ieb90661ex209a73910cfccb75@mail.gmail.com> (raw)
In-Reply-To: <4BD93465.60507@gnu.org>
On Thu, Apr 29, 2010 at 07:25, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 04/21/2010 02:22 PM, Ævar Arnfjörð Bjarmason wrote:
>>
>> I'm working with a system that doesn't play nice with git-format-patch
>> / 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:
>>
>> git format-patch --attach-complete origin..
>> git send-email *.patch
>
> This is a bit underspecified. What should the subject be? 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 private URL
From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= <avar@cpan.org>
Content-Type: multipart/mixed; boundary=00163649a453b0a1ef04855d3190
--00163649a453b0a1ef04855d3190
Content-Type: text/plain; charset=UTF-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 below.
pod/perlrepository.pod | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--00163649a453b0a1ef04855d3190
Content-Type: text/x-patch; charset=US-ASCII;
name="0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.patch"
Content-Disposition: attachment;
filename="0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g8lej0oz0
RnJvbSBmYjYwZTc0NWZkYWI2YzNkZjNkMjU0YjRjMmE2OTM5MzA3ZDNmOGE3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/PUMzPTg2dmFyPTIwQXJuZmo9QzM9QjZyPUMz
PUIwPTIwQmphcm1hc29uPz0gPGF2YXJAY3Bhbi5vcmc+CkRhdGU6IFR1ZSwgMjAgQXByIDIwMTAg
MTk6Mjg6MDEgKzAwMDAKU3ViamVjdDogW1BBVENIXSBEb24ndCBhc2sgdGhlIHBvcnRlcnMgdG8g
ZmV0Y2ggY29tbWl0cyBmcm9tIGEgcHJpdmF0ZSBVUkwKCmdpdEBnaXRodWIuY29tOlVTRVJOQU1F
L3BlcmwuZ2l0IGlzIG9ubHkgYWNjZXNzaWJsZSB0byBVU0VSTkFNRSAob3IKY29sbGFib3JhdG9y
cyksIGdpdDovL2dpdGh1Yi5jb20vVVNFUk5BTUUvcGVybC5naXQgaXMgYXZhaWxhYmxlIHRvCmV2
ZXJ5b25lLgotLS0KIHBvZC9wZXJscmVwb3NpdG9yeS5wb2QgfCAgICAyICstCiAxIGZpbGVzIGNo
YW5nZWQsIDEgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9wb2Qv
cGVybHJlcG9zaXRvcnkucG9kIGIvcG9kL3BlcmxyZXBvc2l0b3J5LnBvZAppbmRleCAwMGRiYmZh
Li5jYzg3YmRlIDEwMDY0NAotLS0gYS9wb2QvcGVybHJlcG9zaXRvcnkucG9kCisrKyBiL3BvZC9w
ZXJscmVwb3NpdG9yeS5wb2QKQEAgLTc1Nyw3ICs3NTcsNyBAQCBlbWFpbCAoc2VlIEw8L1NVQk1J
VFRJTkcgQSBQQVRDSD4pIHdpdGggYSBkZXNjcmlwdGlvbiBvZiB5b3VyIGNoYW5nZXMKIGFuZCB0
aGUgZm9sbG93aW5nIGluZm9ybWF0aW9uOgogCiAgIGh0dHA6Ly9naXRodWIuY29tL1VTRVJOQU1F
L3BlcmwvdHJlZS9vcmFuZ2UKLSAgZ2l0QGdpdGh1Yi5jb206VVNFUk5BTUUvcGVybC5naXQgYnJh
bmNoIG9yYW5nZQorICBnaXQ6Ly9naXRodWIuY29tL1VTRVJOQU1FL3BlcmwuZ2l0IGJyYW5jaCBv
cmFuZ2UKIAogPWhlYWQxIE1lcmdpbmcgZnJvbSBhIGJyYW5jaCB2aWEgR2l0SHViCiAKLS0gCjEu
Ny4xLnJjMQoK
--00163649a453b0a1ef04855d3190--
For comparison this is what `git format-patch a..b` will give me now:
From fb60e745fdab6c3df3d254b4c2a6939307d3f8a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= <avar@cpan.org>
Date: Tue, 20 Apr 2010 19:28:01 +0000
Subject: [PATCH] Don't ask the porters to fetch commits from a private 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</SUBMITTING A PATCH>) 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
=head1 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: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= <avar@cpan.org>
Date: Tue, 20 Apr 2010 19:28:01 +0000
Subject: [PATCH] Don't ask the porters to fetch commits from a private URL
Date: Wed, 21 Apr 2010 11:48:19 +0000
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.7.1.rc1"
From: Ævar Arnfjörð Bjarmason <avar@cpan.org>
This is a multi-part message in MIME format.
--------------1.7.1.rc1
Content-Type: text/plain; charset=UTF-8; format=fixed
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="0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
filename="0001-Don-t-ask-the-porters-to-fetch-commits-from-a-privat.patch"
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</SUBMITTING A PATCH>) 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
=head1 Merging from a branch via GitHub
--------------1.7.1.rc1--
> It seems easiest to write a small filter in Perl, but it could be added as
> an option to git-format-patch, maybe something like
> --cover-letter=attach-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.
prev parent reply other threads:[~2010-04-30 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 12:22 I need a `git format-patch --attach-complete' for RT Ævar Arnfjörð Bjarmason
2010-04-29 7:25 ` Paolo Bonzini
2010-04-29 10:16 ` Ævar Arnfjörð Bjarmason [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=u2v51dd1af81004290316ieb90661ex209a73910cfccb75@mail.gmail.com \
--to=avarab@gmail.com \
--cc=bonzini@gnu.org \
--cc=git@vger.kernel.org \
/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).