-rw-r--r-- | shared.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -22,2 +22,3 @@ char *cgit_cache_root = "/var/cache/cgit"; int cgit_nocache = 0; +int cgit_snapshots = 0; int cgit_max_lock_attempts = 5; @@ -85,2 +86,3 @@ struct repoinfo *add_repo(const char *url) ret->owner = NULL; + ret->snapshots = cgit_snapshots; return ret; @@ -102,2 +104,4 @@ void cgit_global_config_cb(const char *name, const char *value) cgit_nocache = atoi(value); + else if (!strcmp(name, "snapshots")) + cgit_snapshots = atoi(value); else if (!strcmp(name, "cache-root")) @@ -124,2 +128,4 @@ void cgit_global_config_cb(const char *name, const char *value) cgit_repo->owner = xstrdup(value); + else if (cgit_repo && !strcmp(name, "repo.snapshots")) + cgit_repo->snapshots = atoi(value); } |