diff options
Diffstat (limited to 'cgit.c')
| -rw-r--r-- | cgit.c | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -62,6 +62,8 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
| 62 | repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); | 62 | repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); |
| 63 | else if (!strcmp(name, "enable-remote-branches")) | 63 | else if (!strcmp(name, "enable-remote-branches")) |
| 64 | repo->enable_remote_branches = atoi(value); | 64 | repo->enable_remote_branches = atoi(value); |
| 65 | else if (!strcmp(name, "enable-subject-links")) | ||
| 66 | repo->enable_subject_links = atoi(value); | ||
| 65 | else if (!strcmp(name, "max-stats")) | 67 | else if (!strcmp(name, "max-stats")) |
| 66 | repo->max_stats = cgit_find_stats_period(value, NULL); | 68 | repo->max_stats = cgit_find_stats_period(value, NULL); |
| 67 | else if (!strcmp(name, "module-link")) | 69 | else if (!strcmp(name, "module-link")) |
| @@ -141,6 +143,8 @@ void config_cb(const char *name, const char *value) | |||
| 141 | ctx.cfg.enable_log_linecount = atoi(value); | 143 | ctx.cfg.enable_log_linecount = atoi(value); |
| 142 | else if (!strcmp(name, "enable-remote-branches")) | 144 | else if (!strcmp(name, "enable-remote-branches")) |
| 143 | ctx.cfg.enable_remote_branches = atoi(value); | 145 | ctx.cfg.enable_remote_branches = atoi(value); |
| 146 | else if (!strcmp(name, "enable-subject-links")) | ||
| 147 | ctx.cfg.enable_subject_links = atoi(value); | ||
| 144 | else if (!strcmp(name, "enable-tree-linenumbers")) | 148 | else if (!strcmp(name, "enable-tree-linenumbers")) |
| 145 | ctx.cfg.enable_tree_linenumbers = atoi(value); | 149 | ctx.cfg.enable_tree_linenumbers = atoi(value); |
| 146 | else if (!strcmp(name, "max-stats")) | 150 | else if (!strcmp(name, "max-stats")) |
| @@ -165,6 +169,8 @@ void config_cb(const char *name, const char *value) | |||
| 165 | ctx.cfg.commit_filter = new_filter(value, 0); | 169 | ctx.cfg.commit_filter = new_filter(value, 0); |
| 166 | else if (!strcmp(name, "embedded")) | 170 | else if (!strcmp(name, "embedded")) |
| 167 | ctx.cfg.embedded = atoi(value); | 171 | ctx.cfg.embedded = atoi(value); |
| 172 | else if (!strcmp(name, "max-atom-items")) | ||
| 173 | ctx.cfg.max_atom_items = atoi(value); | ||
| 168 | else if (!strcmp(name, "max-message-length")) | 174 | else if (!strcmp(name, "max-message-length")) |
| 169 | ctx.cfg.max_msg_len = atoi(value); | 175 | ctx.cfg.max_msg_len = atoi(value); |
| 170 | else if (!strcmp(name, "max-repodesc-length")) | 176 | else if (!strcmp(name, "max-repodesc-length")) |
| @@ -250,6 +256,8 @@ static void querystring_cb(const char *name, const char *value) | |||
| 250 | ctx.qry.period = xstrdup(value); | 256 | ctx.qry.period = xstrdup(value); |
| 251 | } else if (!strcmp(name, "ss")) { | 257 | } else if (!strcmp(name, "ss")) { |
| 252 | ctx.qry.ssdiff = atoi(value); | 258 | ctx.qry.ssdiff = atoi(value); |
| 259 | } else if (!strcmp(name, "all")) { | ||
| 260 | ctx.qry.show_all = atoi(value); | ||
| 253 | } | 261 | } |
| 254 | } | 262 | } |
| 255 | 263 | ||
| @@ -292,6 +300,7 @@ static void prepare_context(struct cgit_context *ctx) | |||
| 292 | ctx->cfg.summary_branches = 10; | 300 | ctx->cfg.summary_branches = 10; |
| 293 | ctx->cfg.summary_log = 10; | 301 | ctx->cfg.summary_log = 10; |
| 294 | ctx->cfg.summary_tags = 10; | 302 | ctx->cfg.summary_tags = 10; |
| 303 | ctx->cfg.max_atom_items = 10; | ||
| 295 | ctx->cfg.ssdiff = 0; | 304 | ctx->cfg.ssdiff = 0; |
| 296 | ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG")); | 305 | ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG")); |
| 297 | ctx->env.http_host = xstrdupn(getenv("HTTP_HOST")); | 306 | ctx->env.http_host = xstrdupn(getenv("HTTP_HOST")); |
