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

Re: Binary files in format-patch

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
May 6, 2008, 09:19 UTC
Message-ID
<200805061119.14792.robin.rosenberg.lists@dewire.com>
In-Reply-To
<d280d7f10805051555x67bd7e87o999a2c9e19663b92@mail.gmail.com>
tisdagen den 6 maj 2008 00.55.06 skrev Caio Marcelo:
Show 6 quoted lines
> Hello,
>
> I'm using "git format-patch" to generate messages for a code review
> mailing list. It work fine except when we have binary files involved.
> Their contents are not relevant for us, and doesn't help much in a
> mailing list. Taking a peek at the code I've found out this:
Show 12 quoted lines
> In commit e47f306d4bf964def1a0b29e8f7cea419471dffd (short name: "git
> format-patch: make --binary on by default"), we add a new restriction
> on the possible options to format-patch: if you don't specify --text,
> it enables --binary. But looking at today's code, we have a path that
> is never taken for format-patch, in function builtin_diff (diff.c), at
> lines 1423 to 1433. The fprintf doesn't ever happen, because if it's
> TEXT, it dumps the contents verbatim, if it's BINARY, it encodes (to
> some baseXX) the files/diff.
>
> Wouldn't be nice to allow this code path to happen via some
> --omit-binary / --no-binary option to be checked in cmd_format_patch?
> (I could provide a patch for this, if you think it's a good idea).
Sounds reasonable.  I'd say --no-binary is the right one here.
-- robin
Previous: Caio MarceloNext: Caio Marcelo
Message 4 of 6 in “Binary files in format-patch”
  1. Caio MarceloMay 5, 2008
  2. Shawn O. PearceMay 5, 2008
  3. Caio MarceloMay 5, 2008
  4. Robin RosenbergMay 6, 2008
  5. Caio MarceloMay 8, 2008
  6. Caio MarceloMay 8, 2008

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.