all repos — cgit @ e7af002d5c405c82652f739d08ced3908d1f57e7

a hyperfast web frontend for git written in c

Introduce 'section' as canonical spelling for 'repo.group'

The 'repo.' prefix should be reserved for repo-specific options, but
the option 'repo.group' must still be honored to stay backwards
compatible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sun, 23 Aug 2009 22:58:39 +0200
commit

e7af002d5c405c82652f739d08ced3908d1f57e7

parent

50d5af3adcdd90424b70e9472af24356ed50aa9b

6 files changed, 22 insertions(+), 17 deletions(-)

jump to
M cgit.ccgit.c

@@ -143,8 +143,8 @@ else if (!strcmp(name, "local-time"))

ctx.cfg.local_time = atoi(value); else if (!prefixcmp(name, "mimetype.")) add_mimetype(name + 9, value); - else if (!strcmp(name, "repo.group")) - ctx.cfg.repo_group = xstrdup(value); + else if (!strcmp(name, "section") || !strcmp(name, "repo.group")) + ctx.cfg.section = xstrdup(value); else if (!strcmp(name, "repo.url")) ctx.repo = cgit_add_repo(value); else if (!strcmp(name, "repo.name"))
M cgit.csscgit.css

@@ -429,7 +429,7 @@ .right {

text-align: right; } -table.list td.repogroup { +table.list td.reposection { font-style: italic; color: #888; }
M cgit.hcgit.h

@@ -65,9 +65,9 @@ char *path;

char *desc; char *owner; char *defbranch; - char *group; char *module_link; char *readme; + char *section; char *clone_url; int snapshots; int enable_log_filecount;

@@ -156,12 +156,12 @@ char *index_info;

char *logo; char *logo_link; char *module_link; - char *repo_group; char *robots; char *root_title; char *root_desc; char *root_readme; char *script_name; + char *section; char *virtual_root; int cache_size; int cache_dynamic_ttl;
M cgitrc.5.txtcgitrc.5.txt

@@ -200,8 +200,8 @@ "-1" uses the compiletime value in git (for further info, look at

`man git-diff`). Default value: "-1". repo.group:: - A value for the current repository group, which all repositories - specified after this setting will inherit. Default value: none. + Legacy alias for 'section' which will be deprecated starting with + cgit-1.0. robots:: Text used as content for the "robots" meta-tag. Default value:

@@ -224,6 +224,11 @@ scan-path::

A path which will be scanned for repositories. If caching is enabled, the result will be cached as a cgitrc include-file in the cache directory. Default value: none. See also: cache-scanrc-ttl. + +section: + The name of the current repository section - all repositories defined + after this option will inherit the current section name. Default value: + none. snapshots:: Text which specifies the default set of snapshot formats generated by
M shared.cshared.c

@@ -53,7 +53,7 @@ ret->name = ret->url;

ret->path = NULL; ret->desc = "[no description]"; ret->owner = NULL; - ret->group = ctx.cfg.repo_group; + ret->section = ctx.cfg.section; ret->defbranch = "master"; ret->snapshots = ctx.cfg.snapshots; ret->enable_log_filecount = ctx.cfg.enable_log_filecount;
M ui-repolist.cui-repolist.c

@@ -203,7 +203,7 @@

void cgit_print_repolist() { int i, columns = 4, hits = 0, header = 0; - char *last_group = NULL; + char *last_section = NULL; int sorted = 0; if (ctx.cfg.enable_index_links)

@@ -233,18 +233,18 @@ continue;

if (!header++) print_header(columns); if (!sorted && - ((last_group == NULL && ctx.repo->group != NULL) || - (last_group != NULL && ctx.repo->group == NULL) || - (last_group != NULL && ctx.repo->group != NULL && - strcmp(ctx.repo->group, last_group)))) { - htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", + ((last_section == NULL && ctx.repo->section != NULL) || + (last_section != NULL && ctx.repo->section == NULL) || + (last_section != NULL && ctx.repo->section != NULL && + strcmp(ctx.repo->section, last_section)))) { + htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>", columns); - html_txt(ctx.repo->group); + html_txt(ctx.repo->section); html("</td></tr>"); - last_group = ctx.repo->group; + last_section = ctx.repo->section; } htmlf("<tr><td class='%s'>", - !sorted && ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); + !sorted && ctx.repo->section ? "sublevel-repo" : "toplevel-repo"); cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); html("</td><td>"); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);