Re: git-am: "Patch fragment without a header"

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: git-am: "Patch fragment without a header"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:18

"H. Peter Anvin" [off-list ref] writes:
git-am from git-1.1.6 refuses to apply the following two patches,
whereas patch(1) sees nothing wrong with them...
Linus would have said "Say No to MIME".  I am a bit too busy
right now so if you are inclined to take a look, the problem is
in mailinfo.

It tries to do a limited form of MIME and fails.  The problem is
that it does not handle different content transfer encodings
used in the same message.  The first part of the multipart (log
message) does this:

    Content-Type: text/plain; charset=iso-8859-1; format=flowed
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

and it then switches to:

    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline; filename=klibc-add-luks-to-fstype-v2

    Index: klibc/usr/kinit/fstype/fstype.c
    ===================================================================
    --- .....

in the second part.  The mailinfo splits them alright but it
still thinks it needs to help with quoted printable, and ends up
eating these ===== marks and spitting out garbage.

Re: git-am: "Patch fragment without a header"

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:18

Junio C Hamano wrote:
Linus would have said "Say No to MIME".  I am a bit too busy
right now so if you are inclined to take a look, the problem is
in mailinfo.
Unfortunately git-mailinfo is in C, otherwise I'd have suggested using 
the Perl MIME-tools, which seems to have all this stuff in it.

It might just be easier to try to rewrite git-mailinfo in Perl...

	-hpa

Re: git-am: "Patch fragment without a header"

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:18


On Mon, 6 Feb 2006, H. Peter Anvin wrote:
Unfortunately git-mailinfo is in C, otherwise I'd have suggested using the
Perl MIME-tools, which seems to have all this stuff in it.

It might just be easier to try to rewrite git-mailinfo in Perl...
It might just be easier to make the mime checking go the hell away.

I do _not_ want to see some random perl code for the stuff I use (hundreds 
of times) a day. I can apply 5 patches a second right now, and more 
importantly, I know what it does.

Partly because I always edit out the stupid MIME stuff. I think it was a 
mistake to accept MIME patches in the first place.

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help