diff options
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -237,9 +237,11 @@ static void config_cb(const char *name, const char *value) | |||
237 | ctx.cfg.max_repodesc_len = atoi(value); | 237 | ctx.cfg.max_repodesc_len = atoi(value); |
238 | else if (!strcmp(name, "max-blob-size")) | 238 | else if (!strcmp(name, "max-blob-size")) |
239 | ctx.cfg.max_blob_size = atoi(value); | 239 | ctx.cfg.max_blob_size = atoi(value); |
240 | else if (!strcmp(name, "max-repo-count")) | 240 | else if (!strcmp(name, "max-repo-count")) { |
241 | ctx.cfg.max_repo_count = atoi(value); | 241 | ctx.cfg.max_repo_count = atoi(value); |
242 | else if (!strcmp(name, "max-commit-count")) | 242 | if (ctx.cfg.max_repo_count <= 0) |
243 | ctx.cfg.max_repo_count = INT_MAX; | ||
244 | } else if (!strcmp(name, "max-commit-count")) | ||
243 | ctx.cfg.max_commit_count = atoi(value); | 245 | ctx.cfg.max_commit_count = atoi(value); |
244 | else if (!strcmp(name, "project-list")) | 246 | else if (!strcmp(name, "project-list")) |
245 | ctx.cfg.project_list = xstrdup(expand_macros(value)); | 247 | ctx.cfg.project_list = xstrdup(expand_macros(value)); |