cgit.c: always setup cgit repo environment variables
When cgit learned to setup environment variables for certain repo settings before invoking a filter process, the setup occurred inside cgit_open_filter(). This patch moves the setup out of cgit_open_filter() and into prepare_repo_cmd() to prepare for additional uses of these variables. Reviewed-by: Ferry Huberts <mailings@hupie.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
@ -45,7 +45,7 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
|
||||
if (ctx.repo->source_filter) {
|
||||
html("<td class='lines'><pre><code>");
|
||||
ctx.repo->source_filter->argv[1] = xstrdup(name);
|
||||
cgit_open_filter(ctx.repo->source_filter, ctx.repo);
|
||||
cgit_open_filter(ctx.repo->source_filter);
|
||||
html_raw(buf, size);
|
||||
cgit_close_filter(ctx.repo->source_filter);
|
||||
free(ctx.repo->source_filter->argv[1]);
|
||||
|
Verwijs in nieuw issue
Block a user