aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 4dc8eec..ccd61f4 100644
--- a/cgit.c
+++ b/cgit.c
@@ -19,6 +19,10 @@ void config_cb(const char *name, const char *value)
19{ 19{
20 if (!strcmp(name, "root-title")) 20 if (!strcmp(name, "root-title"))
21 ctx.cfg.root_title = xstrdup(value); 21 ctx.cfg.root_title = xstrdup(value);
22 else if (!strcmp(name, "root-desc"))
23 ctx.cfg.root_desc = xstrdup(value);
24 else if (!strcmp(name, "root-readme"))
25 ctx.cfg.root_readme = xstrdup(value);
22 else if (!strcmp(name, "css")) 26 else if (!strcmp(name, "css"))
23 ctx.cfg.css = xstrdup(value); 27 ctx.cfg.css = xstrdup(value);
24 else if (!strcmp(name, "logo")) 28 else if (!strcmp(name, "logo"))
@@ -163,6 +167,7 @@ static void prepare_context(struct cgit_context *ctx)
163 ctx->cfg.renamelimit = -1; 167 ctx->cfg.renamelimit = -1;
164 ctx->cfg.robots = "index, nofollow"; 168 ctx->cfg.robots = "index, nofollow";
165 ctx->cfg.root_title = "Git repository browser"; 169 ctx->cfg.root_title = "Git repository browser";
170 ctx->cfg.root_desc = "a fast webinterface for the git dscm";
166 ctx->cfg.script_name = CGIT_SCRIPT_NAME; 171 ctx->cfg.script_name = CGIT_SCRIPT_NAME;
167 ctx->page.mimetype = "text/html"; 172 ctx->page.mimetype = "text/html";
168 ctx->page.charset = PAGE_ENCODING; 173 ctx->page.charset = PAGE_ENCODING;
@@ -270,7 +275,16 @@ static void process_request(void *cbdata)
270 return; 275 return;
271 } 276 }
272 277
273 if (cmd->want_repo && prepare_repo_cmd(ctx)) 278 if (cmd->want_repo && !ctx->repo) {
279 cgit_print_http_headers(ctx);
280 cgit_print_docstart(ctx);
281 cgit_print_pageheader(ctx);
282 cgit_print_error(fmt("No repository selected"));
283 cgit_print_docend();
284 return;
285 }
286
287 if (ctx->repo && prepare_repo_cmd(ctx))
274 return; 288 return;
275 289
276 if (cmd->want_layout) { 290 if (cmd->want_layout) {