diff options
author | Jed Barber <jjbarber@y7mail.com> | 2021-02-14 00:11:29 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2021-02-14 00:11:29 +1100 |
commit | c2de6335092a4f5ad7a6a962eb7f91c0245e5e25 (patch) | |
tree | bd4ed0e6233c8a5a6ad55b05ec1adcdf892185cd /cgit.c | |
parent | bd6f5683f6cde4212364354b3139c1d521f40f39 (diff) |
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) { |