|
diff --git a/shared.c b/shared.c index a1e1acd..752ceac 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -25,16 +25,17 @@ int cgit_snapshots = 0; |
25 | int cgit_max_lock_attempts = 5; |
25 | int cgit_max_lock_attempts = 5; |
26 | int cgit_cache_root_ttl = 5; |
26 | int cgit_cache_root_ttl = 5; |
27 | int cgit_cache_repo_ttl = 5; |
27 | int cgit_cache_repo_ttl = 5; |
28 | int cgit_cache_dynamic_ttl = 5; |
28 | int cgit_cache_dynamic_ttl = 5; |
29 | int cgit_cache_static_ttl = -1; |
29 | 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_repodesc_len = 60; |
33 | int cgit_max_commit_count = 50; |
34 | int cgit_max_commit_count = 50; |
34 | |
35 | |
35 | int cgit_query_has_symref = 0; |
36 | int cgit_query_has_symref = 0; |
36 | int cgit_query_has_sha1 = 0; |
37 | int cgit_query_has_sha1 = 0; |
37 | |
38 | |
38 | char *cgit_querystring = NULL; |
39 | char *cgit_querystring = NULL; |
39 | char *cgit_query_repo = NULL; |
40 | char *cgit_query_repo = NULL; |
40 | char *cgit_query_page = NULL; |
41 | char *cgit_query_page = NULL; |
@@ -113,16 +114,18 @@ void cgit_global_config_cb(const char *name, const char *value) |
113 | else if (!strcmp(name, "cache-repo-ttl")) |
114 | else if (!strcmp(name, "cache-repo-ttl")) |
114 | cgit_cache_repo_ttl = atoi(value); |
115 | cgit_cache_repo_ttl = atoi(value); |
115 | else if (!strcmp(name, "cache-static-ttl")) |
116 | else if (!strcmp(name, "cache-static-ttl")) |
116 | cgit_cache_static_ttl = atoi(value); |
117 | cgit_cache_static_ttl = atoi(value); |
117 | else if (!strcmp(name, "cache-dynamic-ttl")) |
118 | else if (!strcmp(name, "cache-dynamic-ttl")) |
118 | cgit_cache_dynamic_ttl = atoi(value); |
119 | cgit_cache_dynamic_ttl = atoi(value); |
119 | else if (!strcmp(name, "max-message-length")) |
120 | else if (!strcmp(name, "max-message-length")) |
120 | cgit_max_msg_len = atoi(value); |
121 | cgit_max_msg_len = atoi(value); |
| |
122 | else if (!strcmp(name, "max-repodesc-length")) |
| |
123 | cgit_max_repodesc_len = atoi(value); |
121 | else if (!strcmp(name, "max-commit-count")) |
124 | else if (!strcmp(name, "max-commit-count")) |
122 | cgit_max_commit_count = atoi(value); |
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")) |
126 | cgit_repo->name = xstrdup(value); |
129 | cgit_repo->name = xstrdup(value); |
127 | else if (cgit_repo && !strcmp(name, "repo.path")) |
130 | else if (cgit_repo && !strcmp(name, "repo.path")) |
128 | cgit_repo->path = xstrdup(value); |
131 | cgit_repo->path = xstrdup(value); |
|