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 --- ui-commit.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ui-commit.c') diff --git a/ui-commit.c b/ui-commit.c index de3f2cf..3618800 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -169,11 +169,13 @@ void cgit_print_commit(const char *hex) htmlf("'>%s\n", sha1_to_hex(p->item->object.sha1)); } - htmlf("download%s", filename); + if (cgit_repo->snapshots) { + htmlf("download%s", filename); + } html("\n"); html("
"); -- cgit v1.2.3-59-g8ed1b