-rw-r--r-- | cgit.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -405,2 +405,3 @@ static int prepare_repo_cmd(struct cgit_context *ctx) int nongit = 0; + int rc; @@ -409,5 +410,8 @@ static int prepare_repo_cmd(struct cgit_context *ctx) if (nongit) { + rc = errno; ctx->page.title = fmt("%s - %s", ctx->cfg.root_title, "config error"); - tmp = fmt("Not a git repository: '%s'", ctx->repo->path); + tmp = fmt("Failed to open %s: %s", + ctx->repo->name, + rc ? strerror(rc) : "Not a valid git repository"); ctx->repo = NULL; |