+ unsigned char sha1[20];
+ int nongit = 0;
+
+ setenv("GIT_DIR", ctx.repo->path, 1);
+ setup_git_directory_gently(&nongit);
+ if (nongit) {
+ ctx.page.title = fmt("%s - %s", ctx.cfg.root_title,
+ "config error");
+ tmp = fmt("Not a git repository: '%s'", ctx.repo->path);
+ ctx.repo = NULL;
+ cgit_print_http_headers(&ctx);
+ cgit_print_docstart(&ctx);
+ cgit_print_pageheader(&ctx);
+ cgit_print_error(tmp);
+ cgit_print_docend();
+ return;
+ }
+
+ ctx.page.title = fmt("%s - %s", ctx.repo->name, ctx.repo->desc);
+ show_search = 0;