From: Jeff King Date: Tue, 22 Feb 2011 15:37:29 GMT Subject: Re: [PATCH 2/2] diff: don't retrieve binary blobs for diffstat Message-ID: <20110222153729.GA27178@sigill.intra.peff.net> In-Reply-To: <7v62sdhsjy.fsf@alter.siamese.dyndns.org> On Mon, Feb 21, 2011 at 03:33:05PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > We only need the size, which is much cheaper to get, > > especially if it is a big binary file. > > > > Signed-off-by: Jeff King > > --- > > Nice ;-) Do we want a test or two for 1/2 by the way? Yeah, it's probably a good idea. Can you squash this in, or should I resend? --- diff --git a/t/t4031-diff-rewrite-binary.sh b/t/t4031-diff-rewrite-binary.sh index 7e7b307..7d7470f 100755 --- a/t/t4031-diff-rewrite-binary.sh +++ b/t/t4031-diff-rewrite-binary.sh @@ -44,6 +44,13 @@ test_expect_success 'rewrite diff can show binary patch' ' grep "GIT binary patch" diff ' +test_expect_success 'rewrite diff --stat shows binary changes' ' + git diff -B --stat --summary >diff && + grep "Bin" diff && + grep "0 insertions.*0 deletions" diff && + grep " rewrite file" diff +' + { echo "#!$SHELL_PATH" cat <<'EOF'