author | Lars Hjemli <hjemli@gmail.com> | 2010-07-18 13:03:08 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-07-18 13:03:08 (UTC) |
commit | 5c5d189635287a3bfaa1a4aef133dc0c582a27c2 (patch) (side-by-side diff) | |
tree | cf14b0a5578c9d23a560690e7e256260633ce043 /cgit.c | |
parent | 60fcf600f5010701c20b63867999a802ca0e05c0 (diff) | |
parent | ba56a37e863d0f90e3e953047486905cfb959925 (diff) | |
download | cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.zip cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.tar.gz cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.tar.bz2 |
Merge branch 'lh/macros'
-rw-r--r-- | cgit.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -149,13 +149,13 @@ void config_cb(const char *name, const char *value) ctx.cfg.enable_tree_linenumbers = atoi(value); else if (!strcmp(name, "max-stats")) ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); else if (!strcmp(name, "cache-size")) ctx.cfg.cache_size = atoi(value); else if (!strcmp(name, "cache-root")) - ctx.cfg.cache_root = xstrdup(value); + ctx.cfg.cache_root = xstrdup(expand_macros(value)); else if (!strcmp(name, "cache-root-ttl")) ctx.cfg.cache_root_ttl = atoi(value); else if (!strcmp(name, "cache-repo-ttl")) ctx.cfg.cache_repo_ttl = atoi(value); else if (!strcmp(name, "cache-scanrc-ttl")) ctx.cfg.cache_scanrc_ttl = atoi(value); @@ -180,15 +180,15 @@ void config_cb(const char *name, const char *value) else if (!strcmp(name, "max-repo-count")) ctx.cfg.max_repo_count = atoi(value); else if (!strcmp(name, "max-commit-count")) ctx.cfg.max_commit_count = atoi(value); else if (!strcmp(name, "scan-path")) if (!ctx.cfg.nocache && ctx.cfg.cache_size) - process_cached_repolist(value); + process_cached_repolist(expand_macros(value)); else - scan_tree(value, repo_config); + scan_tree(expand_macros(value), repo_config); else if (!strcmp(name, "source-filter")) ctx.cfg.source_filter = new_filter(value, 1); else if (!strcmp(name, "summary-log")) ctx.cfg.summary_log = atoi(value); else if (!strcmp(name, "summary-branches")) ctx.cfg.summary_branches = atoi(value); @@ -206,13 +206,13 @@ void config_cb(const char *name, const char *value) ctx.cfg.clone_prefix = xstrdup(value); else if (!strcmp(name, "local-time")) ctx.cfg.local_time = atoi(value); else if (!prefixcmp(name, "mimetype.")) add_mimetype(name + 9, value); else if (!strcmp(name, "include")) - parse_configfile(value, config_cb); + parse_configfile(expand_macros(value), config_cb); } static void querystring_cb(const char *name, const char *value) { if (!value) value = ""; @@ -702,13 +702,13 @@ int main(int argc, const char **argv) prepare_context(&ctx); cgit_repolist.length = 0; cgit_repolist.count = 0; cgit_repolist.repos = NULL; cgit_parse_args(argc, argv); - parse_configfile(ctx.env.cgit_config, config_cb); + parse_configfile(expand_macros(ctx.env.cgit_config), config_cb); ctx.repo = NULL; http_parse_querystring(ctx.qry.raw, querystring_cb); /* If virtual-root isn't specified in cgitrc, lets pretend * that virtual-root equals SCRIPT_NAME. */ |