|
diff --git a/shared.c b/shared.c index 76d26dd..9f7d6a5 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -12,3 +12,2 @@ struct cgit_repolist cgit_repolist; |
12 | struct cgit_context ctx; |
12 | struct cgit_context ctx; |
13 | int cgit_cmd; |
| |
14 | |
13 | |
@@ -62,2 +61,3 @@ struct cgit_repo *cgit_add_repo(const char *url) |
62 | ret->enable_remote_branches = ctx.cfg.enable_remote_branches; |
61 | ret->enable_remote_branches = ctx.cfg.enable_remote_branches; |
| |
62 | ret->enable_subject_links = ctx.cfg.enable_subject_links; |
63 | ret->max_stats = ctx.cfg.max_stats; |
63 | ret->max_stats = ctx.cfg.max_stats; |
@@ -265,3 +265,4 @@ int cgit_diff_files(const unsigned char *old_sha1, |
265 | const unsigned char *new_sha1, unsigned long *old_size, |
265 | const unsigned char *new_sha1, unsigned long *old_size, |
266 | unsigned long *new_size, int *binary, linediff_fn fn) |
266 | unsigned long *new_size, int *binary, int context, |
| |
267 | linediff_fn fn) |
267 | { |
268 | { |
@@ -281,2 +282,6 @@ int cgit_diff_files(const unsigned char *old_sha1, |
281 | *binary = 1; |
282 | *binary = 1; |
| |
283 | if (file1.size) |
| |
284 | free(file1.ptr); |
| |
285 | if (file2.size) |
| |
286 | free(file2.ptr); |
282 | return 0; |
287 | return 0; |
@@ -288,3 +293,3 @@ int cgit_diff_files(const unsigned char *old_sha1, |
288 | diff_params.flags = XDF_NEED_MINIMAL; |
293 | diff_params.flags = XDF_NEED_MINIMAL; |
289 | emit_params.ctxlen = 3; |
294 | emit_params.ctxlen = context > 0 ? context : 3; |
290 | emit_params.flags = XDL_EMIT_FUNCNAMES; |
295 | emit_params.flags = XDL_EMIT_FUNCNAMES; |
@@ -293,2 +298,6 @@ int cgit_diff_files(const unsigned char *old_sha1, |
293 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); |
298 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); |
| |
299 | if (file1.size) |
| |
300 | free(file1.ptr); |
| |
301 | if (file2.size) |
| |
302 | free(file2.ptr); |
294 | return 0; |
303 | return 0; |
|