all repos — cgit @ c6f747649ace1a92ed5dfaae9cc1ea3affe0bf51

a hyperfast web frontend for git written in c

Reset ctx.repo to NULL when the config parser is finished

This global variable is used by the config parsing callback to keep track
of the currently configured repository. If it is not reset to NULL when
the config parser is finished, and neither `url` or `r` is specified on the
querystring, cgit will wrongly consider the last configured repo as
selected.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Tue, 08 Apr 2008 21:27:12 +0200
commit

c6f747649ace1a92ed5dfaae9cc1ea3affe0bf51

parent

e87e89633383b8b75c68c98be3e0c14212109de2

1 files changed, 1 insertions(+), 0 deletions(-)

jump to
M cgit.ccgit.c

@@ -440,6 +440,7 @@ cgit_repolist.repos = NULL;

parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG, config_cb); + ctx.repo = NULL; if (getenv("SCRIPT_NAME")) ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME")); if (getenv("QUERY_STRING"))