diff options
author | Christian Hesse <mail@eworm.de> | 2019-02-26 17:08:31 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2019-06-25 21:40:59 +0200 |
commit | e1ad15d368bdeb1bffea588b93a29055c5dfb7f4 (patch) | |
tree | 8659155ec7bfd675237036a1093de23c0f78a021 /cgit.c | |
parent | 27a6d69ab38825602bdbd5a5d0161e465326ea8d (diff) |
ui-tree: allow per repository override for enable-blame
The blame operation can cause high cost in terms of CPU load for huge
repositories. Let's add a per repository override for enable-blame.
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -50,6 +50,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va repo->extra_head_content = xstrdup(value); else if (!strcmp(name, "snapshots")) repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); + else if (!strcmp(name, "enable-blame")) + repo->enable_blame = atoi(value); else if (!strcmp(name, "enable-commit-graph")) repo->enable_commit_graph = atoi(value); else if (!strcmp(name, "enable-log-filecount")) @@ -809,6 +811,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "repo.homepage=%s\n", repo->homepage); if (repo->clone_url) fprintf(f, "repo.clone-url=%s\n", repo->clone_url); + fprintf(f, "repo.enable-blame=%d\n", + repo->enable_blame); fprintf(f, "repo.enable-commit-graph=%d\n", repo->enable_commit_graph); fprintf(f, "repo.enable-log-filecount=%d\n", |