diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 14:47:56 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 14:47:56 +0100 |
commit | ac70cb4795c90db02917db63d169b0fadfe9fb99 (patch) | |
tree | bf7a5c4c8c2789cda2dd511f0a180df279a0b389 /cgit.c | |
parent | ab2ab95f09994560f62fd631f07d3b6e3577aa6e (diff) | |
download | cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.tar.gz cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.tar.bz2 cgit-ac70cb4795c90db02917db63d169b0fadfe9fb99.zip |
Make snapshot feature configurable
Snapshots can now be enabled/disabled by default for all repositories in
cgitrc with param "snapshots". Additionally, any repo can override the
default setting with param "repo.snapshots".
By default, no snapshotting is enabled.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -79,7 +79,8 @@ static void cgit_print_repo_page(struct cacheitem *item) show_search = 0; setenv("GIT_DIR", cgit_repo->path, 1); - if (cgit_query_page && !strcmp(cgit_query_page, "snapshot")) { + if (cgit_repo->snapshots && cgit_query_page && + !strcmp(cgit_query_page, "snapshot")) { cgit_print_snapshot(item, cgit_query_sha1, "zip", cgit_repo->url, cgit_query_name); return; |