summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--cgit.c1
-rw-r--r--ui-repolist.c18
2 files changed, 12 insertions, 7 deletions
diff --git a/cgit.c b/cgit.c
index e281aa9..167b5dd 100644
--- a/cgit.c
+++ b/cgit.c
@@ -271,2 +271,3 @@ static void prepare_context(struct cgit_context *ctx)
271 ctx->cfg.script_name = CGIT_SCRIPT_NAME; 271 ctx->cfg.script_name = CGIT_SCRIPT_NAME;
272 ctx->cfg.section = "";
272 ctx->cfg.summary_branches = 10; 273 ctx->cfg.summary_branches = 10;
diff --git a/ui-repolist.c b/ui-repolist.c
index d56654d..3ef2e99 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -219,2 +219,3 @@ void cgit_print_repolist()
219 char *last_section = NULL; 219 char *last_section = NULL;
220 char *section;
220 int sorted = 0; 221 int sorted = 0;
@@ -249,15 +250,18 @@ void cgit_print_repolist()
249 print_header(columns); 250 print_header(columns);
251 section = ctx.repo->section;
252 if (section && !strcmp(section, ""))
253 section = NULL;
250 if (!sorted && 254 if (!sorted &&
251 ((last_section == NULL && ctx.repo->section != NULL) || 255 ((last_section == NULL && section != NULL) ||
252 (last_section != NULL && ctx.repo->section == NULL) || 256 (last_section != NULL && section == NULL) ||
253 (last_section != NULL && ctx.repo->section != NULL && 257 (last_section != NULL && section != NULL &&
254 strcmp(ctx.repo->section, last_section)))) { 258 strcmp(section, last_section)))) {
255 htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>", 259 htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>",
256 columns); 260 columns);
257 html_txt(ctx.repo->section); 261 html_txt(section);
258 html("</td></tr>"); 262 html("</td></tr>");
259 last_section = ctx.repo->section; 263 last_section = section;
260 } 264 }
261 htmlf("<tr><td class='%s'>", 265 htmlf("<tr><td class='%s'>",
262 !sorted && ctx.repo->section ? "sublevel-repo" : "toplevel-repo"); 266 !sorted && section ? "sublevel-repo" : "toplevel-repo");
263 cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); 267 cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);