]> git.cameronkatri.com Git - cgit.git/blobdiff - cgit.c
Make branches, tags and log play better together in the summary view
[cgit.git] / cgit.c
diff --git a/cgit.c b/cgit.c
index 73b1f028e43d61ece95342f72f89e822516a5d28..6ec763fc670d04af532eaa4570b474533d02081a 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -9,6 +9,8 @@
 #include "cgit.h"
 #include "cache.h"
 #include "cmd.h"
+#include "configfile.h"
+#include "html.h"
 #include "ui-shared.h"
 
 const char *cgit_version = CGIT_VERSION;
@@ -103,7 +105,7 @@ void config_cb(const char *name, const char *value)
                else
                        ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value));
        } else if (!strcmp(name, "include"))
-               cgit_read_config(value, config_cb);
+               parse_configfile(value, config_cb);
 }
 
 static void querystring_cb(const char *name, const char *value)
@@ -436,14 +438,15 @@ int main(int argc, const char **argv)
        cgit_repolist.count = 0;
        cgit_repolist.repos = NULL;
 
-       cgit_read_config(cgit_config_env ? cgit_config_env : CGIT_CONFIG,
+       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"))
                ctx.qry.raw = xstrdup(getenv("QUERY_STRING"));
        cgit_parse_args(argc, argv);
-       cgit_parse_query(ctx.qry.raw, querystring_cb);
+       http_parse_querystring(ctx.qry.raw, querystring_cb);
        if (!cgit_prepare_cache(&item))
                return 0;
        if (ctx.cfg.nocache) {