summaryrefslogtreecommitdiffabout
path: root/cgit.c
Side-by-side diff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index ff678fb..4f68a4b 100644
--- a/cgit.c
+++ b/cgit.c
@@ -70,5 +70,5 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
if (*value == '/')
- ctx.repo->readme = xstrdup(value);
+ repo->readme = xstrdup(value);
else
- ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value));
+ repo->readme = xstrdup(fmt("%s/%s", repo->path, value));
} else if (ctx.cfg.enable_filter_overrides) {
@@ -167,2 +167,4 @@ void config_cb(const char *name, const char *value)
ctx.cfg.max_repodesc_len = atoi(value);
+ else if (!strcmp(name, "max-blob-size"))
+ ctx.cfg.max_blob_size = atoi(value);
else if (!strcmp(name, "max-repo-count"))
@@ -213,2 +215,4 @@ static void querystring_cb(const char *name, const char *value)
} else if (!strcmp(name, "url")) {
+ if (*value == '/')
+ value++;
ctx.qry.url = xstrdup(value);
@@ -274,2 +278,3 @@ static void prepare_context(struct cgit_context *ctx)
ctx->cfg.max_repodesc_len = 80;
+ ctx->cfg.max_blob_size = 0;
ctx->cfg.max_stats = 0;