diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-19 21:43:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-19 21:43:40 -0700 |
commit | 3814c07498f87e7d27b55175ca2852fcc4cd27f4 (patch) | |
tree | 92e59a8d7d9ca5dd3d2928107b88d4b424817c3f /combine-diff.c | |
parent | d8eec50468a64b23e1013bac9e78fc447af046ca (diff) | |
parent | 8a3f524bf2ac534b313a7d8e70cc164cef744949 (diff) | |
download | git-3814c07498f87e7d27b55175ca2852fcc4cd27f4.tar.gz |
Merge branch 'bd/diff-strbuf'
* bd/diff-strbuf:
xdiff-interface: hide the whole "xdiff_emit_state" business from the caller
Use strbuf for struct xdiff_emit_state's remainder
Make xdi_diff_outf interface for running xdiff_outf diffs
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/combine-diff.c b/combine-diff.c index 9f80a1c5e3..31ec0c5165 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -143,8 +143,6 @@ static void append_lost(struct sline *sline, int n, const char *line, int len) } struct combine_diff_state { - struct xdiff_emit_state xm; - unsigned int lno; int ob, on, nb, nn; unsigned long nmask; @@ -217,17 +215,15 @@ 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; state.sline = sline; state.lno = 1; state.num_parent = num_parent; state.n = n; - xdi_diff(&parent_file, result_file, &xpp, &xecfg, &ecb); + xdi_diff_outf(&parent_file, result_file, consume_line, &state, + &xpp, &xecfg, &ecb); free(parent_file.ptr); /* Assign line numbers for this parent. |