]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-diff.c
Add URL parameter 'context' for changing the number of context lines in diffs
[ps-cgit] / ui-diff.c
index fb836df1342e3475558f5f3c8c9fbb84c99a95be..d3a3b2c8bd04977232baa77004ec2e7015eb51b6 100644 (file)
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -127,7 +127,7 @@ static void inspect_filepair(struct diff_filepair *pair)
        lines_added = 0;
        lines_removed = 0;
        cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, &new_size,
-                       &binary, count_diff_lines);
+                       &binary, 0, count_diff_lines);
        if (files >= slots) {
                if (slots == 0)
                        slots = 4;
@@ -288,7 +288,7 @@ static void filepair_cb(struct diff_filepair *pair)
                return;
        }
        if (cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size,
-                           &new_size, &binary, print_line_fn))
+                           &new_size, &binary, ctx.qry.context, print_line_fn))
                cgit_print_error("Error running diff");
        if (binary) {
                if (use_ssdiff)