-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | cgitrc.5.txt | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -207,49 +207,49 @@ static void querystring_cb(const char *name, const char *value) | |||
207 | } else if (!strcmp(name, "mimetype")) { | 207 | } else if (!strcmp(name, "mimetype")) { |
208 | ctx.qry.mimetype = xstrdup(value); | 208 | ctx.qry.mimetype = xstrdup(value); |
209 | } else if (!strcmp(name, "s")){ | 209 | } else if (!strcmp(name, "s")){ |
210 | ctx.qry.sort = xstrdup(value); | 210 | ctx.qry.sort = xstrdup(value); |
211 | } else if (!strcmp(name, "showmsg")) { | 211 | } else if (!strcmp(name, "showmsg")) { |
212 | ctx.qry.showmsg = atoi(value); | 212 | ctx.qry.showmsg = atoi(value); |
213 | } else if (!strcmp(name, "period")) { | 213 | } else if (!strcmp(name, "period")) { |
214 | ctx.qry.period = xstrdup(value); | 214 | ctx.qry.period = xstrdup(value); |
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | static void prepare_context(struct cgit_context *ctx) | 218 | static void prepare_context(struct cgit_context *ctx) |
219 | { | 219 | { |
220 | memset(ctx, 0, sizeof(ctx)); | 220 | memset(ctx, 0, sizeof(ctx)); |
221 | ctx->cfg.agefile = "info/web/last-modified"; | 221 | ctx->cfg.agefile = "info/web/last-modified"; |
222 | ctx->cfg.nocache = 0; | 222 | ctx->cfg.nocache = 0; |
223 | ctx->cfg.cache_size = 0; | 223 | ctx->cfg.cache_size = 0; |
224 | ctx->cfg.cache_dynamic_ttl = 5; | 224 | ctx->cfg.cache_dynamic_ttl = 5; |
225 | ctx->cfg.cache_max_create_time = 5; | 225 | ctx->cfg.cache_max_create_time = 5; |
226 | ctx->cfg.cache_repo_ttl = 5; | 226 | ctx->cfg.cache_repo_ttl = 5; |
227 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; | 227 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; |
228 | ctx->cfg.cache_root_ttl = 5; | 228 | ctx->cfg.cache_root_ttl = 5; |
229 | ctx->cfg.cache_static_ttl = -1; | 229 | ctx->cfg.cache_static_ttl = -1; |
230 | ctx->cfg.css = "/cgit.css"; | 230 | ctx->cfg.css = "/cgit.css"; |
231 | ctx->cfg.logo = "/git-logo.png"; | 231 | ctx->cfg.logo = "/cgit.png"; |
232 | ctx->cfg.local_time = 0; | 232 | ctx->cfg.local_time = 0; |
233 | ctx->cfg.max_repo_count = 50; | 233 | ctx->cfg.max_repo_count = 50; |
234 | ctx->cfg.max_commit_count = 50; | 234 | ctx->cfg.max_commit_count = 50; |
235 | ctx->cfg.max_lock_attempts = 5; | 235 | ctx->cfg.max_lock_attempts = 5; |
236 | ctx->cfg.max_msg_len = 80; | 236 | ctx->cfg.max_msg_len = 80; |
237 | ctx->cfg.max_repodesc_len = 80; | 237 | ctx->cfg.max_repodesc_len = 80; |
238 | ctx->cfg.max_stats = 0; | 238 | ctx->cfg.max_stats = 0; |
239 | ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; | 239 | ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s"; |
240 | ctx->cfg.renamelimit = -1; | 240 | ctx->cfg.renamelimit = -1; |
241 | ctx->cfg.robots = "index, nofollow"; | 241 | ctx->cfg.robots = "index, nofollow"; |
242 | ctx->cfg.root_title = "Git repository browser"; | 242 | ctx->cfg.root_title = "Git repository browser"; |
243 | ctx->cfg.root_desc = "a fast webinterface for the git dscm"; | 243 | ctx->cfg.root_desc = "a fast webinterface for the git dscm"; |
244 | ctx->cfg.script_name = CGIT_SCRIPT_NAME; | 244 | ctx->cfg.script_name = CGIT_SCRIPT_NAME; |
245 | ctx->cfg.summary_branches = 10; | 245 | ctx->cfg.summary_branches = 10; |
246 | ctx->cfg.summary_log = 10; | 246 | ctx->cfg.summary_log = 10; |
247 | ctx->cfg.summary_tags = 10; | 247 | ctx->cfg.summary_tags = 10; |
248 | ctx->page.mimetype = "text/html"; | 248 | ctx->page.mimetype = "text/html"; |
249 | ctx->page.charset = PAGE_ENCODING; | 249 | ctx->page.charset = PAGE_ENCODING; |
250 | ctx->page.filename = NULL; | 250 | ctx->page.filename = NULL; |
251 | ctx->page.size = 0; | 251 | ctx->page.size = 0; |
252 | ctx->page.modified = time(NULL); | 252 | ctx->page.modified = time(NULL); |
253 | ctx->page.expires = ctx->page.modified; | 253 | ctx->page.expires = ctx->page.modified; |
254 | ctx->page.etag = NULL; | 254 | ctx->page.etag = NULL; |
255 | memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list)); | 255 | memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list)); |
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 4d656fe..54490eb 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt | |||
@@ -111,49 +111,49 @@ header:: | |||
111 | verbatim at the top of all pages. Default value: none. | 111 | verbatim at the top of all pages. Default value: none. |
112 | 112 | ||
113 | include:: | 113 | include:: |
114 | Name of a configfile to include before the rest of the current config- | 114 | Name of a configfile to include before the rest of the current config- |
115 | file is parsed. Default value: none. | 115 | file is parsed. Default value: none. |
116 | 116 | ||
117 | index-header:: | 117 | index-header:: |
118 | The content of the file specified with this option will be included | 118 | The content of the file specified with this option will be included |
119 | verbatim above the repository index. This setting is deprecated, and | 119 | verbatim above the repository index. This setting is deprecated, and |
120 | will not be supported by cgit-1.0 (use root-readme instead). Default | 120 | will not be supported by cgit-1.0 (use root-readme instead). Default |
121 | value: none. | 121 | value: none. |
122 | 122 | ||
123 | index-info:: | 123 | index-info:: |
124 | The content of the file specified with this option will be included | 124 | The content of the file specified with this option will be included |
125 | verbatim below the heading on the repository index page. This setting | 125 | verbatim below the heading on the repository index page. This setting |
126 | is deprecated, and will not be supported by cgit-1.0 (use root-desc | 126 | is deprecated, and will not be supported by cgit-1.0 (use root-desc |
127 | instead). Default value: none. | 127 | instead). Default value: none. |
128 | 128 | ||
129 | local-time:: | 129 | local-time:: |
130 | Flag which, if set to "1", makes cgit print commit and tag times in the | 130 | Flag which, if set to "1", makes cgit print commit and tag times in the |
131 | servers timezone. Default value: "0". | 131 | servers timezone. Default value: "0". |
132 | 132 | ||
133 | logo:: | 133 | logo:: |
134 | Url which specifies the source of an image which will be used as a logo | 134 | Url which specifies the source of an image which will be used as a logo |
135 | on all cgit pages. | 135 | on all cgit pages. Default value: "/cgit.png". |
136 | 136 | ||
137 | logo-link:: | 137 | logo-link:: |
138 | Url loaded when clicking on the cgit logo image. If unspecified the | 138 | Url loaded when clicking on the cgit logo image. If unspecified the |
139 | calculated url of the repository index page will be used. Default | 139 | calculated url of the repository index page will be used. Default |
140 | value: none. | 140 | value: none. |
141 | 141 | ||
142 | max-commit-count:: | 142 | max-commit-count:: |
143 | Specifies the number of entries to list per page in "log" view. Default | 143 | Specifies the number of entries to list per page in "log" view. Default |
144 | value: "50". | 144 | value: "50". |
145 | 145 | ||
146 | max-message-length:: | 146 | max-message-length:: |
147 | Specifies the maximum number of commit message characters to display in | 147 | Specifies the maximum number of commit message characters to display in |
148 | "log" view. Default value: "80". | 148 | "log" view. Default value: "80". |
149 | 149 | ||
150 | max-repo-count:: | 150 | max-repo-count:: |
151 | Specifies the number of entries to list per page on therepository | 151 | Specifies the number of entries to list per page on therepository |
152 | index page. Default value: "50". | 152 | index page. Default value: "50". |
153 | 153 | ||
154 | max-repodesc-length:: | 154 | max-repodesc-length:: |
155 | Specifies the maximum number of repo description characters to display | 155 | Specifies the maximum number of repo description characters to display |
156 | on the repository index page. Default value: "80". | 156 | on the repository index page. Default value: "80". |
157 | 157 | ||
158 | max-stats:: | 158 | max-stats:: |
159 | Set the default maximum statistics period. Valid values are "week", | 159 | Set the default maximum statistics period. Valid values are "week", |