summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--cgit.c4
-rw-r--r--cgit.css2
-rw-r--r--cgit.h4
-rw-r--r--cgitrc.5.txt9
-rw-r--r--shared.c2
-rw-r--r--ui-repolist.c18
6 files changed, 22 insertions, 17 deletions
diff --git a/cgit.c b/cgit.c
index a792fe4..013a0fe 100644
--- a/cgit.c
+++ b/cgit.c
@@ -145,4 +145,4 @@ void config_cb(const char *name, const char *value)
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"))
diff --git a/cgit.css b/cgit.css
index e3b32e7..3c65114 100644
--- a/cgit.css
+++ b/cgit.css
@@ -431,3 +431,3 @@ table.diff td div.del {
-table.list td.repogroup {
+table.list td.reposection {
font-style: italic;
diff --git a/cgit.h b/cgit.h
index 5659580..fc7c7d5 100644
--- a/cgit.h
+++ b/cgit.h
@@ -67,5 +67,5 @@ struct cgit_repo {
char *defbranch;
- char *group;
char *module_link;
char *readme;
+ char *section;
char *clone_url;
@@ -158,3 +158,2 @@ struct cgit_config {
char *module_link;
- char *repo_group;
char *robots;
@@ -164,2 +163,3 @@ struct cgit_config {
char *script_name;
+ char *section;
char *virtual_root;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 2abbd41..4d009f9 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -202,4 +202,4 @@ renamelimit::
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.
@@ -227,2 +227,7 @@ scan-path::
+section:
+ The name of the current repository section - all repositories defined
+ after this option will inherit the current section name. Default value:
+ none.
+
snapshots::
diff --git a/shared.c b/shared.c
index 4cb9573..9475581 100644
--- a/shared.c
+++ b/shared.c
@@ -55,3 +55,3 @@ struct cgit_repo *cgit_add_repo(const char *url)
ret->owner = NULL;
- ret->group = ctx.cfg.repo_group;
+ ret->section = ctx.cfg.section;
ret->defbranch = "master";
diff --git a/ui-repolist.c b/ui-repolist.c
index 7c7aa9b..4dea3b3 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -205,3 +205,3 @@ void cgit_print_repolist()
int i, columns = 4, hits = 0, header = 0;
- char *last_group = NULL;
+ char *last_section = NULL;
int sorted = 0;
@@ -235,14 +235,14 @@ void cgit_print_repolist()
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);