aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index 763a558..744bf84 100644
--- a/cmd.c
+++ b/cmd.c
@@ -112,7 +112,10 @@ static void snapshot_fn(struct cgit_context *ctx)
static void stats_fn(struct cgit_context *ctx)
{
- cgit_show_stats(ctx);
+ if (ctx->repo->enable_stats)
+ cgit_show_stats(ctx);
+ else
+ cgit_print_error("Stats disabled for this repo");
}
static void summary_fn(struct cgit_context *ctx)