summaryrefslogtreecommitdiffabout
path: root/shared.c
authorLars Hjemli <hjemli@gmail.com>2010-06-22 14:16:12 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-06-22 14:16:12 (UTC)
commit6f92f332e6a9ee3e16051bda9fe148607af67f65 (patch) (side-by-side diff)
tree49cb7d145fbf40793b220efdc92cd80ab2c6ca05 /shared.c
parent37a24e4e39737edaa5cdde501346a65eeb280e63 (diff)
parentd20313e3daf855ee5d4808e050f54614c200d7b1 (diff)
downloadcgit-6f92f332e6a9ee3e16051bda9fe148607af67f65.zip
cgit-6f92f332e6a9ee3e16051bda9fe148607af67f65.tar.gz
cgit-6f92f332e6a9ee3e16051bda9fe148607af67f65.tar.bz2
Merge branch 'jh/context-lines'
Conflicts: cgit.c cgit.h
Diffstat (limited to 'shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared.c b/shared.c
index 58837dc..06f70bb 100644
--- a/shared.c
+++ b/shared.c
@@ -265,3 +265,4 @@ int cgit_diff_files(const unsigned char *old_sha1,
const unsigned char *new_sha1, unsigned long *old_size,
- unsigned long *new_size, int *binary, linediff_fn fn)
+ unsigned long *new_size, int *binary, int context,
+ linediff_fn fn)
{
@@ -292,3 +293,3 @@ int cgit_diff_files(const unsigned char *old_sha1,
diff_params.flags = XDF_NEED_MINIMAL;
- emit_params.ctxlen = 3;
+ emit_params.ctxlen = context > 0 ? context : 3;
emit_params.flags = XDL_EMIT_FUNCNAMES;