aboutsummaryrefslogtreecommitdiffstats
path: root/range-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/range-diff.c b/range-diff.c
index bd8083f2d1..767af8c5bb 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -197,6 +197,12 @@ static void diffsize_consume(void *data, char *line, unsigned long len)
(*(int *)data)++;
}
+static void diffsize_hunk(void *data, long ob, long on, long nb, long nn,
+ const char *funcline, long funclen)
+{
+ diffsize_consume(data, NULL, 0);
+}
+
static int diffsize(const char *a, const char *b)
{
xpparam_t pp = { 0 };
@@ -210,7 +216,9 @@ static int diffsize(const char *a, const char *b)
mf2.size = strlen(b);
cfg.ctxlen = 3;
- if (!xdi_diff_outf(&mf1, &mf2, diffsize_consume, &count, &pp, &cfg))
+ if (!xdi_diff_outf(&mf1, &mf2,
+ diffsize_hunk, diffsize_consume, &count,
+ &pp, &cfg))
return count;
error(_("failed to generate diff"));
@@ -453,7 +461,8 @@ int show_range_diff(const char *range1, const char *range2,
struct strbuf indent = STRBUF_INIT;
memcpy(&opts, diffopt, sizeof(opts));
- opts.output_format = DIFF_FORMAT_PATCH;
+ if (!opts.output_format)
+ opts.output_format = DIFF_FORMAT_PATCH;
opts.flags.suppress_diff_headers = 1;
opts.flags.dual_color_diffed_diffs = dual_color;
opts.output_prefix = output_prefix_cb;
d>[libata] fix build error, minor cleanupsJeff Garzik2-8/+2 2004-06-21[libata] move some code aroundJeff Garzik1-12/+42 2004-06-21[PATCH] 2.6.7-mm1: drivers/scsi/hosts.h -> scsi/scsi_host.hAdrian Bunk1-1/+1 2004-06-21[PATCH] sparse: the rest of ieee1394 annotationAlexander Viro3-16/+18 2004-06-21[PATCH] sparse: hd.c annotationAlexander Viro1-1/+1 2004-06-21[PATCH] sparse: quota annotationAlexander Viro1-2/+2 2004-06-21[PATCH] sparse: sock_fprog sanitizedAlexander Viro4-154/+206 2004-06-21[PATCH] sparse: raw1394 annotationAlexander Viro3-55/+48 2004-06-21[PATCH] sparse: drivers/net/wan annotationAlexander Viro13-39/+43 2004-06-21[PATCH] sparse: efivars.c initializer fixAlexander Viro1-1/+1 2004-06-21[PATCH] sparse: zlib stray extern removalAlexander Viro1-1/+1 2004-06-21[PATCH] sparse: ncpfs/ioctl.c annotationAlexander Viro2-48/+40 2004-06-21[PATCH] ibmtr missing includeAlexander Viro1-0/+1 2004-06-21[ACPI] re-factor previous mpparse IRQ override fix (Linus Torvalds)Len Brown2-16/+30 2004-06-21[ACPI] fix double timer interrupt mapping (Hans-Frieder Vogt)Len Brown2-2/+2 2004-06-21Rename 'carmel' block driver to 'sx8'.Jeff Garzik4-19/+19 2004-06-21merge fixups.Greg Kroah-Hartman1-1/+1 2004-06-20[NET]: Loopback, allocate per-cpu stats statically and fix cpu refcounting.Andrew Morton1-17/+18 2004-06-20[NET]: Fix dev_queue_xmit build with older gcc.Andrew Morton1-4/+3 2004-06-20[PATCH] only clear ->last_merge when appropriateJens Axboe1-4/+8 2004-06-20[PATCH] kbuild: add deb-pkg targetSam Ravnborg6-60/+190 2004-06-20[PATCH] Avoid rebuild of IKCFG when using O=Sam Ravnborg1-1/+1 2004-06-20[PATCH] wanxl firware build fixSam Ravnborg2-1/+10 2004-06-20[PATCH] Fix idr.h commentGeert Uytterhoeven1-1/+1 2004-06-20[PATCH] Fix warning in tdfxfb.cJesper Juhl1-1/+1 2004-06-20[PATCH] lindent rwsemNick Piggin2-96/+110 2004-06-20[PATCH] jfs warning fixAndrew Morton1-1/+1 2004-06-20[PATCH] Add M48T35 RTC driverRalf Bächle3-0/+339 2004-06-20[PATCH] Cobalt LCD Driver updateRalf Bächle6-325/+560 2004-06-20[PATCH] DS1286 cleanupsRalf Bächle8-21/+646 2004-06-20[PATCH] mips: remove old junkRalf Bächle1-13/+0 2004-06-20[PATCH] NLS support for ASCIIBjoern Jacke3-0/+176 2004-06-20[PATCH] CREDITS updateEberhard Mönkeberg1-2/+2 2004-06-20[PATCH] move as documentationAndrew Morton1-1/+1