aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 9eb2535..7e3d349 100644
--- a/cgit.c
+++ b/cgit.c
@@ -303,6 +303,7 @@ static void querystring_cb(const char *name, const char *value)
303 ctx.qry.period = xstrdup(value); 303 ctx.qry.period = xstrdup(value);
304 } else if (!strcmp(name, "ss")) { 304 } else if (!strcmp(name, "ss")) {
305 ctx.qry.ssdiff = atoi(value); 305 ctx.qry.ssdiff = atoi(value);
306 ctx.qry.has_ssdiff = 1;
306 } else if (!strcmp(name, "all")) { 307 } else if (!strcmp(name, "all")) {
307 ctx.qry.show_all = atoi(value); 308 ctx.qry.show_all = atoi(value);
308 } else if (!strcmp(name, "context")) { 309 } else if (!strcmp(name, "context")) {
@@ -425,13 +426,17 @@ static int prepare_repo_cmd(struct cgit_context *ctx)
425 char *tmp; 426 char *tmp;
426 unsigned char sha1[20]; 427 unsigned char sha1[20];
427 int nongit = 0; 428 int nongit = 0;
429 int rc;
428 430
429 setenv("GIT_DIR", ctx->repo->path, 1); 431 setenv("GIT_DIR", ctx->repo->path, 1);
430 setup_git_directory_gently(&nongit); 432 setup_git_directory_gently(&nongit);
431 if (nongit) { 433 if (nongit) {
434 rc = errno;
432 ctx->page.title = fmt("%s - %s", ctx->cfg.root_title, 435 ctx->page.title = fmt("%s - %s", ctx->cfg.root_title,
433 "config error"); 436 "config error");
434 tmp = fmt("Not a git repository: '%s'", ctx->repo->path); 437 tmp = fmt("Failed to open %s: %s",
438 ctx->repo->name,
439 rc ? strerror(rc) : "Not a valid git repository");
435 ctx->repo = NULL; 440 ctx->repo = NULL;
436 cgit_print_http_headers(ctx); 441 cgit_print_http_headers(ctx);
437 cgit_print_docstart(ctx); 442 cgit_print_docstart(ctx);