diff options
context:
space:
mode:
Diffstat (limited to 'source/cgit.c')
-rw-r--r--source/cgit.c6
1 file changed, 6 insertions, 0 deletions
diff --git a/source/cgit.c b/source/cgit.c
index bdfed0b..f83d15d 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -84,6 +84,8 @@ void cgit_repo_config(struct cgit_repo *repo, const char *name, const char *valu
repo->enable_subject_links = atoi(value);
else if (!strcmp(name, "enable-html-serving"))
repo->enable_html_serving = atoi(value);
+ else if (!strcmp(name, "enable-stats"))
+ repo->enable_stats = atoi(value);
else if (!strcmp(name, "branch-sort")) {
if (!strcmp(value, "age"))
repo->branch_sort = 1;
@@ -183,6 +185,8 @@ static void config_cb(const char *name, const char *value)
ctx.cfg.enable_follow_links = atoi(value);
else if (!strcmp(name, "enable-help"))
ctx.cfg.enable_help = atoi(value);
+ else if (!strcmp(name, "enable-stats"))
+ ctx.cfg.enable_stats = atoi(value);
else if (!strcmp(name, "enable-http-clone"))
ctx.cfg.enable_http_clone = atoi(value);
else if (!strcmp(name, "enable-index-links"))
@@ -867,6 +871,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
}
if (repo->snapshot_prefix)
fprintf(f, "repo.snapshot-prefix=%s\n", repo->snapshot_prefix);
+ if (repo->enable_stats != ctx.cfg.enable_stats)
+ fprintf(f, "repo.enable-stats=%d\n", repo->enable_stats);
if (repo->max_stats != ctx.cfg.max_stats)
fprintf(f, "repo.max-stats=%s\n",
cgit_find_stats_periodname(repo->max_stats));