]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-tree.c
Add support for repo.commit-filter and repo.source-filter
[cgit.git] / ui-tree.c
index 816e1213336fe18f010e47570bebd80207fb20b1..caf6a9e979bea7d9994e8137f25e0563358abea9 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -22,12 +22,12 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
                "<a class='no' id='n%1$d' name='n%1$d' href='#n%1$d'>%1$d</a>\n";
 
        html("<table summary='blob content' class='blob'>\n");
-       if (ctx.cfg.source_filter) {
+       if (ctx.repo->source_filter) {
                html("<tr><td class='lines'><pre><code>");
-               ctx.cfg.source_filter->argv[1] = xstrdup(name);
-               cgit_open_filter(ctx.cfg.source_filter);
+               ctx.repo->source_filter->argv[1] = xstrdup(name);
+               cgit_open_filter(ctx.repo->source_filter);
                write(STDOUT_FILENO, buf, size);
-               cgit_close_filter(ctx.cfg.source_filter);
+               cgit_close_filter(ctx.repo->source_filter);
                html("</code></pre></td></tr></table>\n");
                return;
        }