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 /builtin-blame.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 'builtin-blame.c')
-rw-r--r-- | builtin-blame.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/builtin-blame.c b/builtin-blame.c index 4ea343189f..e4d12de8a9 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -465,7 +465,6 @@ struct patch { }; struct blame_diff_state { - struct xdiff_emit_state xm; struct patch *ret; unsigned hunk_post_context; unsigned hunk_in_pre_context : 1; @@ -528,15 +527,12 @@ static struct patch *compare_buffer(mmfile_t *file_p, mmfile_t *file_o, xpp.flags = xdl_opts; memset(&xecfg, 0, sizeof(xecfg)); xecfg.ctxlen = context; - ecb.outf = xdiff_outf; - ecb.priv = &state; memset(&state, 0, sizeof(state)); - state.xm.consume = process_u_diff; state.ret = xmalloc(sizeof(struct patch)); state.ret->chunks = NULL; state.ret->num = 0; - xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb); + xdi_diff_outf(file_p, file_o, process_u_diff, &state, &xpp, &xecfg, &ecb); if (state.ret->num) { struct chunk *chunk; |