about summary refs log tree commit diff stats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c index dd28a79..0c5ccab 100644 --- a/cgit.c +++ b/cgit.c
@@ -56,6 +56,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
56 repo->homepage = xstrdup(value); 56 repo->homepage = xstrdup(value);
57 else if (!strcmp(name, "defbranch")) 57 else if (!strcmp(name, "defbranch"))
58 repo->defbranch = xstrdup(value); 58 repo->defbranch = xstrdup(value);
59 else if (!strcmp(name, "default-tab"))
60 repo->default_tab = xstrdup(value);
59 else if (!strcmp(name, "extra-head-content")) 61 else if (!strcmp(name, "extra-head-content"))
60 repo->extra_head_content = xstrdup(value); 62 repo->extra_head_content = xstrdup(value);
61 else if (!strcmp(name, "snapshots")) 63 else if (!strcmp(name, "snapshots"))
@@ -285,6 +287,10 @@ static void config_cb(const char *name, const char *value)
285 ctx.cfg.clone_url = xstrdup(value); 287 ctx.cfg.clone_url = xstrdup(value);
286 else if (!strcmp(name, "local-time")) 288 else if (!strcmp(name, "local-time"))
287 ctx.cfg.local_time = atoi(value); 289 ctx.cfg.local_time = atoi(value);
290 else if (!strcmp(name, "default-tab"))
291 ctx.cfg.default_tab = xstrdup(value);
292 else if (!strcmp(name, "root-default-tab"))
293 ctx.cfg.root_default_tab = xstrdup(value);
288 else if (!strcmp(name, "commit-sort")) { 294 else if (!strcmp(name, "commit-sort")) {
289 if (!strcmp(value, "date")) 295 if (!strcmp(value, "date"))
290 ctx.cfg.commit_sort = 1; 296 ctx.cfg.commit_sort = 1;
@@ -373,6 +379,8 @@ static void prepare_context(void)
373 ctx.cfg.cache_scanrc_ttl = 15; 379 ctx.cfg.cache_scanrc_ttl = 15;
374 ctx.cfg.cache_dynamic_ttl = 5; 380 ctx.cfg.cache_dynamic_ttl = 5;
375 ctx.cfg.cache_static_ttl = -1; 381 ctx.cfg.cache_static_ttl = -1;
382 ctx.cfg.default_tab = "summary";
383 ctx.cfg.root_default_tab = "repolist";
376 ctx.cfg.case_sensitive_sort = 1; 384 ctx.cfg.case_sensitive_sort = 1;
377 ctx.cfg.branch_sort = 0; 385 ctx.cfg.branch_sort = 0;
378 ctx.cfg.commit_sort = 0; 386 ctx.cfg.commit_sort = 0;
@@ -818,6 +826,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
818 fprintf(f, "repo.homepage=%s\n", repo->homepage); 826 fprintf(f, "repo.homepage=%s\n", repo->homepage);
819 if (repo->clone_url) 827 if (repo->clone_url)
820 fprintf(f, "repo.clone-url=%s\n", repo->clone_url); 828 fprintf(f, "repo.clone-url=%s\n", repo->clone_url);
829 if (repo->default_tab)
830 fprintf(f, "repo.default-tab=%s\n", repo->default_tab);
821 fprintf(f, "repo.enable-blame=%d\n", 831 fprintf(f, "repo.enable-blame=%d\n",
822 repo->enable_blame); 832 repo->enable_blame);
823 fprintf(f, "repo.enable-commit-graph=%d\n", 833 fprintf(f, "repo.enable-commit-graph=%d\n",