author | Lars Hjemli <hjemli@gmail.com> | 2007-10-27 08:13:42 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-10-27 08:53:27 (UTC) |
commit | 763a6a09deec7290365a0072d25630daa7b417e2 (patch) (unidiff) | |
tree | d882b72c05ef2b798883e637cba3f53ece12d78c /shared.c | |
parent | f6310fec783d2721ef61815a0eec525d6a904452 (diff) | |
download | cgit-763a6a09deec7290365a0072d25630daa7b417e2.zip cgit-763a6a09deec7290365a0072d25630daa7b417e2.tar.gz cgit-763a6a09deec7290365a0072d25630daa7b417e2.tar.bz2 |
Add support for config param summary-branches
This parameter can be used to specify max number of branches to show
on the summary page (if not all branches will be displayed, the "most
idle" branches are the ones to be pruned). The default value for this
parameter is 0, which disables the pruning.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | shared.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -34,16 +34,17 @@ int cgit_enable_log_linecount = 0; | |||
34 | int cgit_max_lock_attempts = 5; | 34 | int cgit_max_lock_attempts = 5; |
35 | int cgit_cache_root_ttl = 5; | 35 | int cgit_cache_root_ttl = 5; |
36 | int cgit_cache_repo_ttl = 5; | 36 | int cgit_cache_repo_ttl = 5; |
37 | int cgit_cache_dynamic_ttl = 5; | 37 | int cgit_cache_dynamic_ttl = 5; |
38 | int cgit_cache_static_ttl = -1; | 38 | int cgit_cache_static_ttl = -1; |
39 | int cgit_cache_max_create_time = 5; | 39 | int cgit_cache_max_create_time = 5; |
40 | int cgit_summary_log = 0; | 40 | int cgit_summary_log = 0; |
41 | int cgit_summary_tags = 0; | 41 | int cgit_summary_tags = 0; |
42 | int cgit_summary_branches = 0; | ||
42 | int cgit_renamelimit = -1; | 43 | int cgit_renamelimit = -1; |
43 | 44 | ||
44 | int cgit_max_msg_len = 60; | 45 | int cgit_max_msg_len = 60; |
45 | int cgit_max_repodesc_len = 60; | 46 | int cgit_max_repodesc_len = 60; |
46 | int cgit_max_commit_count = 50; | 47 | int cgit_max_commit_count = 50; |
47 | 48 | ||
48 | int cgit_query_has_symref = 0; | 49 | int cgit_query_has_symref = 0; |
49 | int cgit_query_has_sha1 = 0; | 50 | int cgit_query_has_sha1 = 0; |
@@ -177,16 +178,18 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
177 | else if (!strcmp(name, "max-message-length")) | 178 | else if (!strcmp(name, "max-message-length")) |
178 | cgit_max_msg_len = atoi(value); | 179 | cgit_max_msg_len = atoi(value); |
179 | else if (!strcmp(name, "max-repodesc-length")) | 180 | else if (!strcmp(name, "max-repodesc-length")) |
180 | cgit_max_repodesc_len = atoi(value); | 181 | cgit_max_repodesc_len = atoi(value); |
181 | else if (!strcmp(name, "max-commit-count")) | 182 | else if (!strcmp(name, "max-commit-count")) |
182 | cgit_max_commit_count = atoi(value); | 183 | cgit_max_commit_count = atoi(value); |
183 | else if (!strcmp(name, "summary-log")) | 184 | else if (!strcmp(name, "summary-log")) |
184 | cgit_summary_log = atoi(value); | 185 | cgit_summary_log = atoi(value); |
186 | else if (!strcmp(name, "summary-branches")) | ||
187 | cgit_summary_branches = atoi(value); | ||
185 | else if (!strcmp(name, "summary-tags")) | 188 | else if (!strcmp(name, "summary-tags")) |
186 | cgit_summary_tags = atoi(value); | 189 | cgit_summary_tags = atoi(value); |
187 | else if (!strcmp(name, "agefile")) | 190 | else if (!strcmp(name, "agefile")) |
188 | cgit_agefile = xstrdup(value); | 191 | cgit_agefile = xstrdup(value); |
189 | else if (!strcmp(name, "renamelimit")) | 192 | else if (!strcmp(name, "renamelimit")) |
190 | cgit_renamelimit = atoi(value); | 193 | cgit_renamelimit = atoi(value); |
191 | else if (!strcmp(name, "repo.group")) | 194 | else if (!strcmp(name, "repo.group")) |
192 | cgit_repo_group = xstrdup(value); | 195 | cgit_repo_group = xstrdup(value); |