From: Lars Hjemli Date: Tue, 8 Dec 2009 17:31:07 +0000 (+0100) Subject: Merge branch 'master' of http://op-co.de/cgit X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/57bb4fdb8419d7c250d4c6146910df3263943951?hp=-c Merge branch 'master' of http://op-co.de/cgit --- 57bb4fdb8419d7c250d4c6146910df3263943951 diff --combined cgit.c index bfde9f9,e1d38c2..08cb5d2 --- a/cgit.c +++ b/cgit.c @@@ -68,9 -68,9 +68,9 @@@ void repo_config(struct cgit_repo *repo repo->section = xstrdup(value); else if (!strcmp(name, "readme") && value != NULL) { 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) { if (!strcmp(name, "about-filter")) repo->about_filter = new_filter(value, 0); @@@ -165,6 -165,8 +165,8 @@@ void config_cb(const char *name, const ctx.cfg.max_msg_len = atoi(value); else if (!strcmp(name, "max-repodesc-length")) 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")) ctx.cfg.max_repo_count = atoi(value); else if (!strcmp(name, "max-commit-count")) @@@ -270,6 -272,7 +272,7 @@@ static void prepare_context(struct cgit ctx->cfg.max_lock_attempts = 5; ctx->cfg.max_msg_len = 80; ctx->cfg.max_repodesc_len = 80; + ctx->cfg.max_blob_size = 0; ctx->cfg.max_stats = 0; ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; ctx->cfg.renamelimit = -1;