author | Lars Hjemli <hjemli@gmail.com> | 2008-07-27 10:58:37 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-07-27 10:58:37 (UTC) |
commit | 952f4ece296d91b8b41f56de9e1c3bc80f94f196 (patch) (unidiff) | |
tree | 3ad6b53b89c0508b70c6dbf9bb73a02252b8ff98 /cgit.c | |
parent | 25c84326deff579d5de4b880f9dca2690bdc8569 (diff) | |
download | cgit-952f4ece296d91b8b41f56de9e1c3bc80f94f196.zip cgit-952f4ece296d91b8b41f56de9e1c3bc80f94f196.tar.gz cgit-952f4ece296d91b8b41f56de9e1c3bc80f94f196.tar.bz2 |
Modify default value for a few cgitrc options
The default max-length used when printing commit messages and repo
descriptions can be increased due to the new layout (no sidebar).
Also, on the repo summary page I believe it makes sense to only show the
ten most recent branches and tags by default, just as it makes sense to
show the ten most recent commit messages for the active branch.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -157,40 +157,43 @@ static void prepare_context(struct cgit_context *ctx) | |||
157 | { | 157 | { |
158 | memset(ctx, 0, sizeof(ctx)); | 158 | memset(ctx, 0, sizeof(ctx)); |
159 | ctx->cfg.agefile = "info/web/last-modified"; | 159 | ctx->cfg.agefile = "info/web/last-modified"; |
160 | ctx->cfg.nocache = 0; | 160 | ctx->cfg.nocache = 0; |
161 | ctx->cfg.cache_size = 0; | 161 | ctx->cfg.cache_size = 0; |
162 | ctx->cfg.cache_dynamic_ttl = 5; | 162 | ctx->cfg.cache_dynamic_ttl = 5; |
163 | ctx->cfg.cache_max_create_time = 5; | 163 | ctx->cfg.cache_max_create_time = 5; |
164 | ctx->cfg.cache_repo_ttl = 5; | 164 | ctx->cfg.cache_repo_ttl = 5; |
165 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; | 165 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; |
166 | ctx->cfg.cache_root_ttl = 5; | 166 | ctx->cfg.cache_root_ttl = 5; |
167 | ctx->cfg.cache_static_ttl = -1; | 167 | ctx->cfg.cache_static_ttl = -1; |
168 | ctx->cfg.css = "/cgit.css"; | 168 | ctx->cfg.css = "/cgit.css"; |
169 | ctx->cfg.logo = "/git-logo.png"; | 169 | ctx->cfg.logo = "/git-logo.png"; |
170 | ctx->cfg.max_repo_count = 50; | 170 | ctx->cfg.max_repo_count = 50; |
171 | ctx->cfg.max_commit_count = 50; | 171 | ctx->cfg.max_commit_count = 50; |
172 | ctx->cfg.max_lock_attempts = 5; | 172 | ctx->cfg.max_lock_attempts = 5; |
173 | ctx->cfg.max_msg_len = 60; | 173 | ctx->cfg.max_msg_len = 80; |
174 | ctx->cfg.max_repodesc_len = 60; | 174 | ctx->cfg.max_repodesc_len = 80; |
175 | ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; | 175 | ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; |
176 | ctx->cfg.renamelimit = -1; | 176 | ctx->cfg.renamelimit = -1; |
177 | ctx->cfg.robots = "index, nofollow"; | 177 | ctx->cfg.robots = "index, nofollow"; |
178 | ctx->cfg.root_title = "Git repository browser"; | 178 | ctx->cfg.root_title = "Git repository browser"; |
179 | ctx->cfg.root_desc = "a fast webinterface for the git dscm"; | 179 | ctx->cfg.root_desc = "a fast webinterface for the git dscm"; |
180 | ctx->cfg.script_name = CGIT_SCRIPT_NAME; | 180 | ctx->cfg.script_name = CGIT_SCRIPT_NAME; |
181 | ctx->cfg.summary_branches = 10; | ||
182 | ctx->cfg.summary_log = 10; | ||
183 | ctx->cfg.summary_tags = 10; | ||
181 | ctx->page.mimetype = "text/html"; | 184 | ctx->page.mimetype = "text/html"; |
182 | ctx->page.charset = PAGE_ENCODING; | 185 | ctx->page.charset = PAGE_ENCODING; |
183 | ctx->page.filename = NULL; | 186 | ctx->page.filename = NULL; |
184 | ctx->page.modified = time(NULL); | 187 | ctx->page.modified = time(NULL); |
185 | ctx->page.expires = ctx->page.modified; | 188 | ctx->page.expires = ctx->page.modified; |
186 | } | 189 | } |
187 | 190 | ||
188 | struct refmatch { | 191 | struct refmatch { |
189 | char *req_ref; | 192 | char *req_ref; |
190 | char *first_ref; | 193 | char *first_ref; |
191 | int match; | 194 | int match; |
192 | }; | 195 | }; |
193 | 196 | ||
194 | int find_current_ref(const char *refname, const unsigned char *sha1, | 197 | int find_current_ref(const char *refname, const unsigned char *sha1, |
195 | int flags, void *cb_data) | 198 | int flags, void *cb_data) |
196 | { | 199 | { |