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

Re: PATCH: Allow format-patch to attach patches

From
MMMike McCormack <mike@codeweavers.com>
Date
Mar 7, 2006, 03:20 UTC
Message-ID
<440CFC06.9080901@codeweavers.com>
In-Reply-To
<7vpskz5aqh.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> The only two and half minor issues I might have about this are:
> 
>  (1) is the type text/x-patch appropriate?

I'm no expert on MIME types, unfortunately. Maybe text/x-diff makes more sense? A few different projects require one of those two types for diffs sent as attachments. My main concern is that mailers can recognize that the attachment is text, then displayed with the message so that people can see the patch without opening the attachment.

>  (2) is it possible to cheaply come up with a safe mime-magic,
>      instead of a hardcoded long string and hope it does not
>      clash?
I agree that using a hardcoded long string isn't that great.  Reading 
all of the "diff-tree -p" output seems a bit expensive.  How about using 
   some part of the patch's SHA1 combined with date/time?
> The remaining half issue is if would it make sense to sometimes
> optionally use non 8-bit CTE for the patch part.
Maybe allow something like:
git-format-patch --attach=quoted-printable

where the default would be 8bit. This require adding a perl script for each Content-Transfer-Encoding that we support.

Mike
Previous: Junio C HamanoNext: A Large Angry SCM
Message 3 of 4 in “PATCH: Allow format-patch to attach patches”
  1. Mike McCormackMar 6, 2006
  2. Junio C HamanoMar 7, 2006
  3. Mike McCormackMar 7, 2006
  4. A Large Angry SCMMar 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.