Re: git-mailinfo munges the patch?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 29, 2007, 21:24 UTC
- Message-ID
- <7vejn73fqg.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070329205357.GF11029@redhat.com>
Don Zickus <dzickus@redhat.com> writes:
Show 10 quoted lines
> 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?
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 masterThe 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.