summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/cgit.c b/cgit.c
index 9452884..c263872 100644
--- a/cgit.c
+++ b/cgit.c
@@ -64,2 +64,4 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
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"))
@@ -143,2 +145,4 @@ void config_cb(const char *name, const char *value)
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"))
@@ -150,3 +154,3 @@ void config_cb(const char *name, const char *value)
150 else if (!strcmp(name, "cache-root")) 154 else if (!strcmp(name, "cache-root"))
151 ctx.cfg.cache_root = xstrdup(value); 155 ctx.cfg.cache_root = xstrdup(expand_macros(value));
152 else if (!strcmp(name, "cache-root-ttl")) 156 else if (!strcmp(name, "cache-root-ttl"))
@@ -167,2 +171,4 @@ void config_cb(const char *name, const char *value)
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"))
@@ -179,5 +185,5 @@ void config_cb(const char *name, const char *value)
179 if (!ctx.cfg.nocache && ctx.cfg.cache_size) 185 if (!ctx.cfg.nocache && ctx.cfg.cache_size)
180 process_cached_repolist(value); 186 process_cached_repolist(expand_macros(value));
181 else 187 else
182 scan_tree(value, repo_config); 188 scan_tree(expand_macros(value), repo_config);
183 else if (!strcmp(name, "source-filter")) 189 else if (!strcmp(name, "source-filter"))
@@ -205,3 +211,3 @@ void config_cb(const char *name, const char *value)
205 else if (!strcmp(name, "include")) 211 else if (!strcmp(name, "include"))
206 parse_configfile(value, config_cb); 212 parse_configfile(expand_macros(value), config_cb);
207} 213}
@@ -252,2 +258,4 @@ static void querystring_cb(const char *name, const char *value)
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 } else if (!strcmp(name, "context")) { 261 } else if (!strcmp(name, "context")) {
@@ -298,2 +306,3 @@ static void prepare_context(struct cgit_context *ctx)
298 ctx->cfg.summary_tags = 10; 306 ctx->cfg.summary_tags = 10;
307 ctx->cfg.max_atom_items = 10;
299 ctx->cfg.ssdiff = 0; 308 ctx->cfg.ssdiff = 0;
@@ -700,3 +709,3 @@ int main(int argc, const char **argv)
700 cgit_parse_args(argc, argv); 709 cgit_parse_args(argc, argv);
701 parse_configfile(ctx.env.cgit_config, config_cb); 710 parse_configfile(expand_macros(ctx.env.cgit_config), config_cb);
702 ctx.repo = NULL; 711 ctx.repo = NULL;