From: Junio C Hamano Date: Wed, 16 Mar 2011 23:47:26 +0000 (-0700) Subject: Merge branch 'jk/diffstat-binary' into maint X-Git-Tag: v1.7.4.2~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4e530c5049a305f82c3e4768b26e6a689aa3c84e;p=git.git Merge branch 'jk/diffstat-binary' into maint * jk/diffstat-binary: diff: don't retrieve binary blobs for diffstat diff: handle diffstat of rewritten binary files --- 4e530c5049a305f82c3e4768b26e6a689aa3c84e diff --cc diff.c index 2f2ab87d9,0d2ed00da..3fd9e0c70 --- a/diff.c +++ b/diff.c @@@ -2095,15 -1838,18 +2104,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); }