aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index e8c1f94..916feb4 100644
--- a/cgit.c
+++ b/cgit.c
@@ -57,6 +57,8 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
57 repo->defbranch = xstrdup(value); 57 repo->defbranch = xstrdup(value);
58 else if (!strcmp(name, "snapshots")) 58 else if (!strcmp(name, "snapshots"))
59 repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); 59 repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value);
60 else if (!strcmp(name, "enable-commit-graph"))
61 repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value);
60 else if (!strcmp(name, "enable-log-filecount")) 62 else if (!strcmp(name, "enable-log-filecount"))
61 repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value); 63 repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value);
62 else if (!strcmp(name, "enable-log-linecount")) 64 else if (!strcmp(name, "enable-log-linecount"))
@@ -145,6 +147,8 @@ void config_cb(const char *name, const char *value)
145 ctx.cfg.enable_gitweb_owner = atoi(value); 147 ctx.cfg.enable_gitweb_owner = atoi(value);
146 else if (!strcmp(name, "enable-index-links")) 148 else if (!strcmp(name, "enable-index-links"))
147 ctx.cfg.enable_index_links = atoi(value); 149 ctx.cfg.enable_index_links = atoi(value);
150 else if (!strcmp(name, "enable-commit-graph"))
151 ctx.cfg.enable_commit_graph = atoi(value);
148 else if (!strcmp(name, "enable-log-filecount")) 152 else if (!strcmp(name, "enable-log-filecount"))
149 ctx.cfg.enable_log_filecount = atoi(value); 153 ctx.cfg.enable_log_filecount = atoi(value);
150 else if (!strcmp(name, "enable-log-linecount")) 154 else if (!strcmp(name, "enable-log-linecount"))
@@ -199,6 +203,8 @@ void config_cb(const char *name, const char *value)
199 ctx.cfg.project_list, repo_config); 203 ctx.cfg.project_list, repo_config);
200 else 204 else
201 scan_tree(expand_macros(value), repo_config); 205 scan_tree(expand_macros(value), repo_config);
206 else if (!strcmp(name, "scan-hidden-path"))
207 ctx.cfg.scan_hidden_path = atoi(value);
202 else if (!strcmp(name, "section-from-path")) 208 else if (!strcmp(name, "section-from-path"))
203 ctx.cfg.section_from_path = atoi(value); 209 ctx.cfg.section_from_path = atoi(value);
204 else if (!strcmp(name, "source-filter")) 210 else if (!strcmp(name, "source-filter"))
@@ -319,6 +325,7 @@ static void prepare_context(struct cgit_context *ctx)
319 ctx->cfg.robots = "index, nofollow"; 325 ctx->cfg.robots = "index, nofollow";
320 ctx->cfg.root_title = "Git repository browser"; 326 ctx->cfg.root_title = "Git repository browser";
321 ctx->cfg.root_desc = "a fast webinterface for the git dscm"; 327 ctx->cfg.root_desc = "a fast webinterface for the git dscm";
328 ctx->cfg.scan_hidden_path = 0;
322 ctx->cfg.script_name = CGIT_SCRIPT_NAME; 329 ctx->cfg.script_name = CGIT_SCRIPT_NAME;
323 ctx->cfg.section = ""; 330 ctx->cfg.section = "";
324 ctx->cfg.summary_branches = 10; 331 ctx->cfg.summary_branches = 10;
@@ -544,6 +551,8 @@ void print_repo(FILE *f, struct cgit_repo *repo)
544 fprintf(f, "repo.section=%s\n", repo->section); 551 fprintf(f, "repo.section=%s\n", repo->section);
545 if (repo->clone_url) 552 if (repo->clone_url)
546 fprintf(f, "repo.clone-url=%s\n", repo->clone_url); 553 fprintf(f, "repo.clone-url=%s\n", repo->clone_url);
554 fprintf(f, "repo.enable-commit-graph=%d\n",
555 repo->enable_commit_graph);
547 fprintf(f, "repo.enable-log-filecount=%d\n", 556 fprintf(f, "repo.enable-log-filecount=%d\n",
548 repo->enable_log_filecount); 557 repo->enable_log_filecount);
549 fprintf(f, "repo.enable-log-linecount=%d\n", 558 fprintf(f, "repo.enable-log-linecount=%d\n",