mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 00:18:41 +00:00
cgitrc: handle value "0" for max-repo-count
Setting max-repo-count to "0" makes cgit loop forever generating page links. Make this a special value to show all repositories. Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
852cb3b0e2
commit
91f25909b9
6
cgit.c
6
cgit.c
@ -237,9 +237,11 @@ static 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"))
|
||||
else if (!strcmp(name, "max-repo-count")) {
|
||||
ctx.cfg.max_repo_count = atoi(value);
|
||||
else if (!strcmp(name, "max-commit-count"))
|
||||
if (ctx.cfg.max_repo_count <= 0)
|
||||
ctx.cfg.max_repo_count = INT_MAX;
|
||||
} else if (!strcmp(name, "max-commit-count"))
|
||||
ctx.cfg.max_commit_count = atoi(value);
|
||||
else if (!strcmp(name, "project-list"))
|
||||
ctx.cfg.project_list = xstrdup(expand_macros(value));
|
||||
|
@ -269,7 +269,8 @@ max-message-length::
|
||||
|
||||
max-repo-count::
|
||||
Specifies the number of entries to list per page on the repository
|
||||
index page. Default value: "50".
|
||||
index page. The value "0" shows all repositories without limitation.
|
||||
Default value: "50".
|
||||
|
||||
max-repodesc-length::
|
||||
Specifies the maximum number of repo description characters to display
|
||||
|
Loading…
Reference in New Issue
Block a user