Add a 'stats' page to each repo

This new page, which is disabled by default, can be used to print some
statistics about the number of commits per period in the repository,
where period can be either weeks, months, quarters or years.

The function can be activated globally by setting 'enable-stats=1' in
cgitrc and disabled for individual repos by setting 'repo.enable-stats=0'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli 2008-12-06 17:38:19 +01:00
parent 140012d7a8
commit f86a23ff53
10 changed files with 497 additions and 0 deletions

View file

@ -58,6 +58,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
ret->snapshots = ctx.cfg.snapshots;
ret->enable_log_filecount = ctx.cfg.enable_log_filecount;
ret->enable_log_linecount = ctx.cfg.enable_log_linecount;
ret->enable_stats = ctx.cfg.enable_stats;
ret->module_link = ctx.cfg.module_link;
ret->readme = NULL;
return ret;