|
diff --git a/shared.c b/shared.c index f20fb5c..ab00bc9 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -17,24 +17,25 @@ char *cgit_css = "/cgit.css"; |
17 | char *cgit_logo = "/git-logo.png"; |
17 | char *cgit_logo = "/git-logo.png"; |
18 | char *cgit_index_header = NULL; |
18 | char *cgit_index_header = NULL; |
19 | char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/"; |
19 | char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/"; |
20 | char *cgit_module_link = "./?repo=%s&page=commit&id=%s"; |
20 | char *cgit_module_link = "./?repo=%s&page=commit&id=%s"; |
21 | char *cgit_agefile = "info/web/last-modified"; |
21 | char *cgit_agefile = "info/web/last-modified"; |
22 | char *cgit_virtual_root = NULL; |
22 | char *cgit_virtual_root = NULL; |
23 | char *cgit_script_name = CGIT_SCRIPT_NAME; |
23 | char *cgit_script_name = CGIT_SCRIPT_NAME; |
24 | char *cgit_cache_root = "/var/cache/cgit"; |
24 | char *cgit_cache_root = "/var/cache/cgit"; |
25 | char *cgit_repo_group = NULL; |
25 | char *cgit_repo_group = NULL; |
26 | |
26 | |
27 | int cgit_nocache = 0; |
27 | int cgit_nocache = 0; |
28 | int cgit_snapshots = 0; |
28 | int cgit_snapshots = 0; |
| |
29 | int cgit_enable_index_links = 0; |
29 | int cgit_enable_log_filecount = 0; |
30 | int cgit_enable_log_filecount = 0; |
30 | int cgit_enable_log_linecount = 0; |
31 | int cgit_enable_log_linecount = 0; |
31 | int cgit_max_lock_attempts = 5; |
32 | int cgit_max_lock_attempts = 5; |
32 | int cgit_cache_root_ttl = 5; |
33 | int cgit_cache_root_ttl = 5; |
33 | int cgit_cache_repo_ttl = 5; |
34 | int cgit_cache_repo_ttl = 5; |
34 | int cgit_cache_dynamic_ttl = 5; |
35 | int cgit_cache_dynamic_ttl = 5; |
35 | int cgit_cache_static_ttl = -1; |
36 | int cgit_cache_static_ttl = -1; |
36 | int cgit_cache_max_create_time = 5; |
37 | int cgit_cache_max_create_time = 5; |
37 | int cgit_summary_log = 0; |
38 | int cgit_summary_log = 0; |
38 | |
39 | |
39 | int cgit_max_msg_len = 60; |
40 | int cgit_max_msg_len = 60; |
40 | int cgit_max_repodesc_len = 60; |
41 | int cgit_max_repodesc_len = 60; |
@@ -137,24 +138,26 @@ void cgit_global_config_cb(const char *name, const char *value) |
137 | else if (!strcmp(name, "index-header")) |
138 | else if (!strcmp(name, "index-header")) |
138 | cgit_index_header = xstrdup(value); |
139 | cgit_index_header = xstrdup(value); |
139 | else if (!strcmp(name, "logo-link")) |
140 | else if (!strcmp(name, "logo-link")) |
140 | cgit_logo_link = xstrdup(value); |
141 | cgit_logo_link = xstrdup(value); |
141 | else if (!strcmp(name, "module-link")) |
142 | else if (!strcmp(name, "module-link")) |
142 | cgit_module_link = xstrdup(value); |
143 | cgit_module_link = xstrdup(value); |
143 | else if (!strcmp(name, "virtual-root")) |
144 | else if (!strcmp(name, "virtual-root")) |
144 | cgit_virtual_root = xstrdup(value); |
145 | cgit_virtual_root = xstrdup(value); |
145 | else if (!strcmp(name, "nocache")) |
146 | else if (!strcmp(name, "nocache")) |
146 | cgit_nocache = atoi(value); |
147 | cgit_nocache = atoi(value); |
147 | else if (!strcmp(name, "snapshots")) |
148 | else if (!strcmp(name, "snapshots")) |
148 | cgit_snapshots = atoi(value); |
149 | cgit_snapshots = atoi(value); |
| |
150 | else if (!strcmp(name, "enable-index-links")) |
| |
151 | cgit_enable_index_links = atoi(value); |
149 | else if (!strcmp(name, "enable-log-filecount")) |
152 | else if (!strcmp(name, "enable-log-filecount")) |
150 | cgit_enable_log_filecount = atoi(value); |
153 | cgit_enable_log_filecount = atoi(value); |
151 | else if (!strcmp(name, "enable-log-linecount")) |
154 | else if (!strcmp(name, "enable-log-linecount")) |
152 | cgit_enable_log_linecount = atoi(value); |
155 | cgit_enable_log_linecount = atoi(value); |
153 | else if (!strcmp(name, "cache-root")) |
156 | else if (!strcmp(name, "cache-root")) |
154 | cgit_cache_root = xstrdup(value); |
157 | cgit_cache_root = xstrdup(value); |
155 | else if (!strcmp(name, "cache-root-ttl")) |
158 | else if (!strcmp(name, "cache-root-ttl")) |
156 | cgit_cache_root_ttl = atoi(value); |
159 | cgit_cache_root_ttl = atoi(value); |
157 | else if (!strcmp(name, "cache-repo-ttl")) |
160 | else if (!strcmp(name, "cache-repo-ttl")) |
158 | cgit_cache_repo_ttl = atoi(value); |
161 | cgit_cache_repo_ttl = atoi(value); |
159 | else if (!strcmp(name, "cache-static-ttl")) |
162 | else if (!strcmp(name, "cache-static-ttl")) |
160 | cgit_cache_static_ttl = atoi(value); |
163 | cgit_cache_static_ttl = atoi(value); |
|