git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Feb 7, 2006, 03:20 UTC
Message-ID
<7vwtg73ld7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<43E80D23.4070007@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> 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.

Previous: H. Peter AnvinNext: H. Peter Anvin
Message 2 of 5 in “git-am: "Patch fragment without a header"”
  1. H. Peter AnvinFeb 7, 2006
  2. Junio C HamanoFeb 7, 2006
  3. H. Peter AnvinFeb 7, 2006
  4. Junio C HamanoFeb 7, 2006
  5. Linus TorvaldsFeb 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.