diff options
-rw-r--r-- | cgit.c | 4 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | cgitrc | 4 | ||||
-rw-r--r-- | shared.c | 3 |
4 files changed, 10 insertions, 2 deletions
@@ -107,8 +107,8 @@ static void cgit_print_repo_page(struct cacheitem *item) | |||
107 | cgit_print_pageheader(cgit_query_page, show_search); | 107 | cgit_print_pageheader(cgit_query_page, show_search); |
108 | 108 | ||
109 | if (!strcmp(cgit_query_page, "log")) { | 109 | if (!strcmp(cgit_query_page, "log")) { |
110 | cgit_print_log(cgit_query_head, cgit_query_ofs, 100, | 110 | cgit_print_log(cgit_query_head, cgit_query_ofs, |
111 | cgit_query_search); | 111 | cgit_max_commit_count, cgit_query_search); |
112 | } else if (!strcmp(cgit_query_page, "tree")) { | 112 | } else if (!strcmp(cgit_query_page, "tree")) { |
113 | cgit_print_tree(cgit_query_sha1, cgit_query_path); | 113 | cgit_print_tree(cgit_query_sha1, cgit_query_path); |
114 | } else if (!strcmp(cgit_query_page, "commit")) { | 114 | } else if (!strcmp(cgit_query_page, "commit")) { |
@@ -87,6 +87,7 @@ extern int cgit_cache_static_ttl; | |||
87 | extern int cgit_cache_max_create_time; | 87 | extern int cgit_cache_max_create_time; |
88 | 88 | ||
89 | extern int cgit_max_msg_len; | 89 | extern int cgit_max_msg_len; |
90 | extern int cgit_max_commit_count; | ||
90 | 91 | ||
91 | extern char *cgit_repo_name; | 92 | extern char *cgit_repo_name; |
92 | extern char *cgit_repo_desc; | 93 | extern char *cgit_repo_desc; |
@@ -55,6 +55,10 @@ | |||
55 | #max-message-length=60 | 55 | #max-message-length=60 |
56 | 56 | ||
57 | 57 | ||
58 | ## Number of commits per page in log view | ||
59 | #max-commit-count=50 | ||
60 | |||
61 | |||
58 | ## Root of cached output | 62 | ## Root of cached output |
59 | #cache-root=/var/cache/cgit | 63 | #cache-root=/var/cache/cgit |
60 | 64 | ||
@@ -30,6 +30,7 @@ int cgit_cache_static_ttl = -1; | |||
30 | int cgit_cache_max_create_time = 5; | 30 | int cgit_cache_max_create_time = 5; |
31 | 31 | ||
32 | int cgit_max_msg_len = 60; | 32 | int cgit_max_msg_len = 60; |
33 | int cgit_max_commit_count = 50; | ||
33 | 34 | ||
34 | char *cgit_repo_name = NULL; | 35 | char *cgit_repo_name = NULL; |
35 | char *cgit_repo_desc = NULL; | 36 | char *cgit_repo_desc = NULL; |
@@ -120,6 +121,8 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
120 | cgit_cache_dynamic_ttl = atoi(value); | 121 | cgit_cache_dynamic_ttl = atoi(value); |
121 | else if (!strcmp(name, "max-message-length")) | 122 | else if (!strcmp(name, "max-message-length")) |
122 | cgit_max_msg_len = atoi(value); | 123 | cgit_max_msg_len = atoi(value); |
124 | else if (!strcmp(name, "max-commit-count")) | ||
125 | cgit_max_commit_count = atoi(value); | ||
123 | else if (!strcmp(name, "repo.url")) | 126 | else if (!strcmp(name, "repo.url")) |
124 | cgit_repo = add_repo(value); | 127 | cgit_repo = add_repo(value); |
125 | else if (!strcmp(name, "repo.name")) | 128 | else if (!strcmp(name, "repo.name")) |