From: Jeff King Date: Sat, 19 Feb 2011 08:03:07 GMT Subject: Re: Commit/merge messages for binary files 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: > 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