diff options
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -52,6 +52,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va repo->desc = xstrdup(value); else if (!strcmp(name, "owner")) repo->owner = xstrdup(value); + else if (!strcmp(name, "language")) + repo->language = xstrdup(value); + else if (!strcmp(name, "license")) + repo->license = xstrdup(value); else if (!strcmp(name, "homepage")) repo->homepage = xstrdup(value); else if (!strcmp(name, "defbranch")) @@ -177,6 +181,10 @@ static void config_cb(const char *name, const char *value) ctx.cfg.enable_index_links = atoi(value); else if (!strcmp(name, "enable-index-owner")) ctx.cfg.enable_index_owner = atoi(value); + else if (!strcmp(name, "enable-index-license")) + ctx.cfg.enable_index_license = atoi(value); + else if (!strcmp(name, "enable-index-language")) + ctx.cfg.enable_index_language = atoi(value); else if (!strcmp(name, "enable-blame")) ctx.cfg.enable_blame = atoi(value); else if (!strcmp(name, "enable-commit-graph")) @@ -382,6 +390,8 @@ static void prepare_context(void) ctx.cfg.local_time = 0; ctx.cfg.enable_http_clone = 1; ctx.cfg.enable_index_owner = 1; + ctx.cfg.enable_index_language = 0; + ctx.cfg.enable_index_license = 0; ctx.cfg.enable_tree_linenumbers = 1; ctx.cfg.enable_git_config = 0; ctx.cfg.max_repo_count = 50; @@ -791,6 +801,10 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "repo.url=%s\n", repo->url); fprintf(f, "repo.name=%s\n", repo->name); fprintf(f, "repo.path=%s\n", repo->path); + if (repo->language) + fprintf(f, "repo.language=%s\n", repo->language); + if (repo->license) + fprintf(f, "repo.license=%s\n", repo->license); if (repo->owner) fprintf(f, "repo.owner=%s\n", repo->owner); if (repo->desc) { |