git-mailinfo munges the patch?

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

git-mailinfo munges the patch?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:02

I noticed that the new mailinfo when splitting a message into
cover letter and the patch text seems to munge the patch text,
applying the same "if content-type is not there then assume
latin-1 and recode to utf-8" logic that is applied to the commit
log message.  That munging should not be done to the patch text,
and it appears the current code botches it.

I am a bit too busy with day job today and haven't had a chance
to look into this problem fully, but 1.5.0.3 does not seem to
have this problem but post 87ab7992 mailinfo is problematic.

Re: git-mailinfo munges the patch?

From: Don Zickus <hidden>
Date: 2016-06-15 22:43:02

On Thu, Mar 29, 2007 at 01:18:51PM -0700, Junio C Hamano wrote:
I noticed that the new mailinfo when splitting a message into
cover letter and the patch text seems to munge the patch text,
applying the same "if content-type is not there then assume
latin-1 and recode to utf-8" logic that is applied to the commit
log message.  That munging should not be done to the patch text,
and it appears the current code botches it.
Ok.  I see what you are saying with the old code.  Sorry about that.  Do
you have a sample file that I can play with to test my fix?

Cheers,
Don

Re: git-mailinfo munges the patch?

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:02


On Thu, 29 Mar 2007, Don Zickus wrote:
Ok.  I see what you are saying with the old code.  Sorry about that.  Do
you have a sample file that I can play with to test my fix?
On that note - here's an unrelated simple case that the old mailinfo got 
right, but the new one seems to screw up: multiple Subject: lines.

The old one would make later Subject: lines override the earlier ones, and 
I depended on that when I fix up peoples emails to me manually (you 
wouldn't believe how bad explanations or subject lines people use for 
perfectly good patches ;)

The current mailinfo seems to just take the first one. 

		Linus

Re: git-mailinfo munges the patch?

From: Don Zickus <hidden>
Date: 2016-06-15 22:43:02

On Thu, Mar 29, 2007 at 02:19:26PM -0700, Linus Torvalds wrote:

On Thu, 29 Mar 2007, Don Zickus wrote:
quoted
Ok.  I see what you are saying with the old code.  Sorry about that.  Do
you have a sample file that I can play with to test my fix?
On that note - here's an unrelated simple case that the old mailinfo got 
right, but the new one seems to screw up: multiple Subject: lines.

The old one would make later Subject: lines override the earlier ones, and 
I depended on that when I fix up peoples emails to me manually (you 
wouldn't believe how bad explanations or subject lines people use for 
perfectly good patches ;)
I see what happened.  The old code allowed rewriting of the mail headers
but blocked rewriting of the inbody headers.  For some reason I thought it
was by accident that the mail headers were allow to be rewritten.  Oops.
:(

I wrote the code to have both header types block rewriting.  I'll change
that.  

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