From ac70cb4795c90db02917db63d169b0fadfe9fb99 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Thu, 8 Feb 2007 14:47:56 +0100 Subject: 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 --- cgit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index 2795ecc..7b7afba 100644 --- a/cgit.c +++ b/cgit.c @@ -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; -- cgit v1.2.3-59-g8ed1b