summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shared.c b/shared.c
index 077934f..cd9d68d 100644
--- a/shared.c
+++ b/shared.c
@@ -364,24 +364,25 @@ int cgit_diff_files(const unsigned char *old_sha1,
364{ 364{
365 mmfile_t file1, file2; 365 mmfile_t file1, file2;
366 xpparam_t diff_params; 366 xpparam_t diff_params;
367 xdemitconf_t emit_params; 367 xdemitconf_t emit_params;
368 xdemitcb_t emit_cb; 368 xdemitcb_t emit_cb;
369 369
370 if (!load_mmfile(&file1, old_sha1) || !load_mmfile(&file2, new_sha1)) 370 if (!load_mmfile(&file1, old_sha1) || !load_mmfile(&file2, new_sha1))
371 return 1; 371 return 1;
372 372
373 diff_params.flags = XDF_NEED_MINIMAL; 373 diff_params.flags = XDF_NEED_MINIMAL;
374 emit_params.ctxlen = 3; 374 emit_params.ctxlen = 3;
375 emit_params.flags = XDL_EMIT_FUNCNAMES; 375 emit_params.flags = XDL_EMIT_FUNCNAMES;
376 emit_params.find_func = NULL;
376 emit_cb.outf = filediff_cb; 377 emit_cb.outf = filediff_cb;
377 emit_cb.priv = fn; 378 emit_cb.priv = fn;
378 xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); 379 xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb);
379 return 0; 380 return 0;
380} 381}
381 382
382void cgit_diff_tree(const unsigned char *old_sha1, 383void cgit_diff_tree(const unsigned char *old_sha1,
383 const unsigned char *new_sha1, 384 const unsigned char *new_sha1,
384 filepair_fn fn) 385 filepair_fn fn)
385{ 386{
386 struct diff_options opt; 387 struct diff_options opt;
387 int ret; 388 int ret;