Re: git-mailinfo munges the patch?

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

Re: git-mailinfo munges the patch?

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

Don Zickus [off-list ref] writes:
On Thu, Mar 29, 2007 at 01:18:51PM -0700, Junio C Hamano wrote:
quoted
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?
Attached are two files.

The first one is to be split with git-mailsplit and then
processed with git-mailinfo; I just tried to make sure what I
expect to see as the output is given by 1.5.0 but not with the
current 'master'.

The second one is a bundle of the repository the test data comes
from.  You could use it like this:

	$ mkdir foo && cd foo && git init
        $ git pull ../sample.bdl master

The repository has one branch, 'master', with two commits on
it.  The first one creates an empty file 'a', and the second one
adds a line to the file, which has a Spanish "tilde on top of N"
in it, and the contents of the file is encoded in ISO 8859-1.

The commit message of the second one is plain ascii but it could
be in UTF-8.

The point is that patch can have payload from different files
that are possibly in different encodings, so shoud really be
treated as binary data without mangling.

Thanks.

Re: git-mailinfo munges the patch?

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

On Thu, Mar 29, 2007 at 02:24:39PM -0700, Junio C Hamano wrote:
Don Zickus [off-list ref] writes:
quoted
On Thu, Mar 29, 2007 at 01:18:51PM -0700, Junio C Hamano wrote:
quoted
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?
Attached are two files.
Thanks.  I'll play with them later tonight.

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