- if (!strcmp(name, "root"))
- cgit_root = xstrdup(value);
- else if (!strcmp(name, "root-title"))
- cgit_root_title = xstrdup(value);
- else if (!strcmp(name, "css"))
- cgit_css = xstrdup(value);
- else if (!strcmp(name, "logo"))
- cgit_logo = xstrdup(value);
- else if (!strcmp(name, "logo-link"))
- cgit_logo_link = xstrdup(value);
- else if (!strcmp(name, "virtual-root"))
- cgit_virtual_root = xstrdup(value);
-}
-
-void cgit_repo_config_cb(const char *name, const char *value)
-{
- if (!strcmp(name, "name"))
- cgit_repo_name = xstrdup(value);
- else if (!strcmp(name, "desc"))
- cgit_repo_desc = xstrdup(value);
- else if (!strcmp(name, "owner"))
- cgit_repo_owner = xstrdup(value);
-}
-
-void cgit_querystring_cb(const char *name, const char *value)
-{
- if (!strcmp(name,"r"))
- cgit_query_repo = xstrdup(value);
- else if (!strcmp(name, "p"))
- cgit_query_page = xstrdup(value);
- else if (!strcmp(name, "h")) {
- cgit_query_head = xstrdup(value);
- cgit_query_has_symref = 1;
- } else if (!strcmp(name, "id")) {
- cgit_query_sha1 = xstrdup(value);
- cgit_query_has_sha1 = 1;
+ if (!cgit_repo && cgit_query_repo) {
+ char *title = fmt("%s - %s", cgit_root_title, "Bad request");
+ cgit_print_docstart(title, item);
+ cgit_print_pageheader(title, 0);
+ cgit_print_error(fmt("Unknown repo: %s", cgit_query_repo));
+ cgit_print_docend();
+ return 0;