|
|
@ -56,6 +56,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
|
|
|
|
repo->homepage = xstrdup(value);
|
|
|
|
repo->homepage = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "defbranch"))
|
|
|
|
else if (!strcmp(name, "defbranch"))
|
|
|
|
repo->defbranch = xstrdup(value);
|
|
|
|
repo->defbranch = xstrdup(value);
|
|
|
|
|
|
|
|
else if (!strcmp(name, "default-page"))
|
|
|
|
|
|
|
|
repo->default_page = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "extra-head-content"))
|
|
|
|
else if (!strcmp(name, "extra-head-content"))
|
|
|
|
repo->extra_head_content = xstrdup(value);
|
|
|
|
repo->extra_head_content = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "snapshots"))
|
|
|
|
else if (!strcmp(name, "snapshots"))
|
|
|
@ -141,6 +143,8 @@ static void config_cb(const char *name, const char *value)
|
|
|
|
ctx.cfg.root_desc = xstrdup(value);
|
|
|
|
ctx.cfg.root_desc = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "root-readme"))
|
|
|
|
else if (!strcmp(name, "root-readme"))
|
|
|
|
ctx.cfg.root_readme = xstrdup(value);
|
|
|
|
ctx.cfg.root_readme = xstrdup(value);
|
|
|
|
|
|
|
|
else if (!strcmp(name, "root-default-page"))
|
|
|
|
|
|
|
|
ctx.cfg.root_default_page = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "css"))
|
|
|
|
else if (!strcmp(name, "css"))
|
|
|
|
string_list_append(&ctx.cfg.css, xstrdup(value));
|
|
|
|
string_list_append(&ctx.cfg.css, xstrdup(value));
|
|
|
|
else if (!strcmp(name, "js"))
|
|
|
|
else if (!strcmp(name, "js"))
|
|
|
@ -157,6 +161,8 @@ static void config_cb(const char *name, const char *value)
|
|
|
|
ctx.cfg.logo = xstrdup(value);
|
|
|
|
ctx.cfg.logo = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "logo-link"))
|
|
|
|
else if (!strcmp(name, "logo-link"))
|
|
|
|
ctx.cfg.logo_link = xstrdup(value);
|
|
|
|
ctx.cfg.logo_link = xstrdup(value);
|
|
|
|
|
|
|
|
else if (!strcmp(name, "default-page"))
|
|
|
|
|
|
|
|
ctx.cfg.default_page = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "module-link"))
|
|
|
|
else if (!strcmp(name, "module-link"))
|
|
|
|
ctx.cfg.module_link = xstrdup(value);
|
|
|
|
ctx.cfg.module_link = xstrdup(value);
|
|
|
|
else if (!strcmp(name, "strict-export"))
|
|
|
|
else if (!strcmp(name, "strict-export"))
|
|
|
@ -380,6 +386,7 @@ static void prepare_context(void)
|
|
|
|
ctx.cfg.case_sensitive_sort = 1;
|
|
|
|
ctx.cfg.case_sensitive_sort = 1;
|
|
|
|
ctx.cfg.branch_sort = 0;
|
|
|
|
ctx.cfg.branch_sort = 0;
|
|
|
|
ctx.cfg.commit_sort = 0;
|
|
|
|
ctx.cfg.commit_sort = 0;
|
|
|
|
|
|
|
|
ctx.cfg.default_page= "summary";
|
|
|
|
ctx.cfg.logo = "/cgit.png";
|
|
|
|
ctx.cfg.logo = "/cgit.png";
|
|
|
|
ctx.cfg.favicon = "/favicon.ico";
|
|
|
|
ctx.cfg.favicon = "/favicon.ico";
|
|
|
|
ctx.cfg.local_time = 0;
|
|
|
|
ctx.cfg.local_time = 0;
|
|
|
@ -400,6 +407,7 @@ static void prepare_context(void)
|
|
|
|
ctx.cfg.robots = "index, nofollow";
|
|
|
|
ctx.cfg.robots = "index, nofollow";
|
|
|
|
ctx.cfg.root_title = "Git repository browser";
|
|
|
|
ctx.cfg.root_title = "Git repository browser";
|
|
|
|
ctx.cfg.root_desc = "a fast webinterface for the git dscm";
|
|
|
|
ctx.cfg.root_desc = "a fast webinterface for the git dscm";
|
|
|
|
|
|
|
|
ctx.cfg.root_default_page = "repolist";
|
|
|
|
ctx.cfg.scan_hidden_path = 0;
|
|
|
|
ctx.cfg.scan_hidden_path = 0;
|
|
|
|
ctx.cfg.script_name = CGIT_SCRIPT_NAME;
|
|
|
|
ctx.cfg.script_name = CGIT_SCRIPT_NAME;
|
|
|
|
ctx.cfg.section = "";
|
|
|
|
ctx.cfg.section = "";
|
|
|
@ -811,6 +819,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (repo->defbranch)
|
|
|
|
if (repo->defbranch)
|
|
|
|
fprintf(f, "repo.defbranch=%s\n", repo->defbranch);
|
|
|
|
fprintf(f, "repo.defbranch=%s\n", repo->defbranch);
|
|
|
|
|
|
|
|
if (repo->default_page)
|
|
|
|
|
|
|
|
fprintf(f, "repo.default-page=%s\n", repo->default_page);
|
|
|
|
if (repo->extra_head_content)
|
|
|
|
if (repo->extra_head_content)
|
|
|
|
fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content);
|
|
|
|
fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content);
|
|
|
|
if (repo->module_link)
|
|
|
|
if (repo->module_link)
|
|
|
|