summaryrefslogtreecommitdiffabout
path: root/shared.c
Side-by-side diff
Diffstat (limited to 'shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared.c b/shared.c
index 65fc8b2..ccbde27 100644
--- a/shared.c
+++ b/shared.c
@@ -146,25 +146,25 @@ void cgit_global_config_cb(const char *name, const char *value)
cgit_logo = xstrdup(value);
else if (!strcmp(name, "index-header"))
cgit_index_header = xstrdup(value);
else if (!strcmp(name, "logo-link"))
cgit_logo_link = xstrdup(value);
else if (!strcmp(name, "module-link"))
cgit_module_link = xstrdup(value);
else if (!strcmp(name, "virtual-root"))
cgit_virtual_root = xstrdup(value);
else if (!strcmp(name, "nocache"))
cgit_nocache = atoi(value);
else if (!strcmp(name, "snapshots"))
- cgit_snapshots = atoi(value);
+ cgit_snapshots = cgit_parse_snapshots_mask(value);
else if (!strcmp(name, "enable-index-links"))
cgit_enable_index_links = atoi(value);
else if (!strcmp(name, "enable-log-filecount"))
cgit_enable_log_filecount = atoi(value);
else if (!strcmp(name, "enable-log-linecount"))
cgit_enable_log_linecount = atoi(value);
else if (!strcmp(name, "cache-root"))
cgit_cache_root = xstrdup(value);
else if (!strcmp(name, "cache-root-ttl"))
cgit_cache_root_ttl = atoi(value);
else if (!strcmp(name, "cache-repo-ttl"))
cgit_cache_repo_ttl = atoi(value);
@@ -188,25 +188,25 @@ void cgit_global_config_cb(const char *name, const char *value)
cgit_repo = add_repo(value);
else if (!strcmp(name, "repo.name"))
cgit_repo->name = xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.path"))
cgit_repo->path = xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.desc"))
cgit_repo->desc = xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.owner"))
cgit_repo->owner = xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.defbranch"))
cgit_repo->defbranch = xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.snapshots"))
- cgit_repo->snapshots = cgit_snapshots * atoi(value);
+ cgit_repo->snapshots = cgit_snapshots & cgit_parse_snapshots_mask(value); /* XXX: &? */
else if (cgit_repo && !strcmp(name, "repo.enable-log-filecount"))
cgit_repo->enable_log_filecount = cgit_enable_log_filecount * atoi(value);
else if (cgit_repo && !strcmp(name, "repo.enable-log-linecount"))
cgit_repo->enable_log_linecount = cgit_enable_log_linecount * atoi(value);
else if (cgit_repo && !strcmp(name, "repo.module-link"))
cgit_repo->module_link= xstrdup(value);
else if (cgit_repo && !strcmp(name, "repo.readme") && value != NULL) {
if (*value == '/')
cgit_repo->readme = xstrdup(value);
else
cgit_repo->readme = xstrdup(fmt("%s/%s", cgit_repo->path, value));
} else if (!strcmp(name, "include"))