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

Re: Commit/merge messages for binary files

From
Jeff King <peff@peff.net>
Date
Feb 19, 2011, 08:03 UTC
Message-ID
<20110219080307.GA18039@sigill.intra.peff.net>
In-Reply-To
<20110219070601.GA14059@sigill.intra.peff.net>
On Sat, Feb 19, 2011 at 02:06:01AM -0500, Jeff King wrote:
Show 17 quoted lines
> Now that seems wrong. What about doing another diff:
> 
>   $ git show --oneline --stat --summary
>   43961bc two
>    foo.rand |  Bin 4096 -> 4096 bytes
>    1 files changed, 0 insertions(+), 0 deletions(-)
> 
> That's right. Now let's turn on break detection:
> 
>   $ git show --oneline --stat --summary -B
>   43961bc two
>    foo.rand |   34 +++++++++++++++-------------------
>    1 files changed, 15 insertions(+), 19 deletions(-)
>    rewrite foo.rand (100%)
> 
> Broken again. So I guess we have some problem with making sure we treat
> broken filepairs as binary.

Yep, builtin_diffstat just didn't handle that case. Two patch series to follow:

  [1/2]: diff: handle diffstat of rewritten binary files
  [2/2]: diff: don't retrieve binary blobs for diffstat

The first one fixes the bug, and the second is a convenient optimization I noticed while there.

-Peff
Previous: Jeff KingNext: Jeff King
Message 7 of 12 in “Commit/merge messages for binary files”
  1. Piotr KrukowieckiFeb 17, 2011
  2. Matthieu MoyFeb 18, 2011
  3. Piotr KrukowieckiFeb 18, 2011
  4. Matthieu MoyFeb 18, 2011
  5. Piotr KrukowieckiFeb 18, 2011
  6. Jeff KingFeb 19, 2011
  7. Jeff KingFeb 19, 2011
  8. 1/2 diff: handle diffstat of rewritten binary filesJeff King, Feb 19, 2011
  9. 2/2 diff: don't retrieve binary blobs for diffstatJeff King, Feb 19, 2011
  10. Junio C HamanoFeb 21, 2011
  11. Jeff KingFeb 22, 2011
  12. Junio C HamanoFeb 22, 2011

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.