summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorBrian Downing <bdowning@lavos.net>2008-08-14 05:36:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-14 06:10:23 (GMT)
commitc99db9d292c5f63c83ae2b441a67121d76553413 (patch)
treebdb63fae285ccaa9b54dbe9a4bde0ec1ac41bc96 /combine-diff.c
parenta0653d550524a0263d36fde6a8cf98941dd057ab (diff)
downloadgit-c99db9d292c5f63c83ae2b441a67121d76553413.zip
git-c99db9d292c5f63c83ae2b441a67121d76553413.tar.gz
git-c99db9d292c5f63c83ae2b441a67121d76553413.tar.bz2
Make xdi_diff_outf interface for running xdiff_outf diffs
To prepare for the need to initialize and release resources for an xdi_diff with the xdiff_outf output function, make a new function to wrap this usage. Old: ecb.outf = xdiff_outf; ecb.priv = &state; ... xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb); New: xdi_diff_outf(file_p, file_o, &state.xm, &xpp, &xecfg, &ecb); Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 9f80a1c..72dd6d2 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -217,8 +217,6 @@ static void combine_diff(const unsigned char *parent, mmfile_t *result_file,
parent_file.size = sz;
xpp.flags = XDF_NEED_MINIMAL;
memset(&xecfg, 0, sizeof(xecfg));
- ecb.outf = xdiff_outf;
- ecb.priv = &state;
memset(&state, 0, sizeof(state));
state.xm.consume = consume_line;
state.nmask = nmask;
@@ -227,7 +225,8 @@ static void combine_diff(const unsigned char *parent, mmfile_t *result_file,
state.num_parent = num_parent;
state.n = n;
- xdi_diff(&parent_file, result_file, &xpp, &xecfg, &ecb);
+ xdi_diff_outf(&parent_file, result_file,
+ &state.xm, &xpp, &xecfg, &ecb);
free(parent_file.ptr);
/* Assign line numbers for this parent.