From: Junio C Hamano Date: Fri, 4 Mar 2011 23:02:27 +0000 (-0800) Subject: Merge branch 'jk/diffstat-binary' X-Git-Tag: v1.7.5-rc0~98 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1538f21bfb33dcaa65fe84b9823a8963bf1e6443;p=git.git Merge branch 'jk/diffstat-binary' * jk/diffstat-binary: diff: don't retrieve binary blobs for diffstat diff: handle diffstat of rewritten binary files --- 1538f21bfb33dcaa65fe84b9823a8963bf1e6443 diff --cc diff.c index 5422c4388,0d2ed00da..66408571a --- a/diff.c +++ b/diff.c @@@ -2097,15 -1838,18 +2106,17 @@@ static void builtin_diffstat(const cha /* Crazy xdl interfaces.. */ xpparam_t xpp; xdemitconf_t xecfg; - xdemitcb_t ecb; + if (fill_mmfile(&mf1, one) < 0 || fill_mmfile(&mf2, two) < 0) + die("unable to read files to diff"); + memset(&xpp, 0, sizeof(xpp)); memset(&xecfg, 0, sizeof(xecfg)); - xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts; + xpp.flags = o->xdl_opts; xdi_diff_outf(&mf1, &mf2, diffstat_consume, diffstat, - &xpp, &xecfg, &ecb); + &xpp, &xecfg); } - free_and_return: diff_free_filespec_data(one); diff_free_filespec_data(two); }