X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/c58cec9dff273b44c428cfaee24e5e3743c0034e..8eef4589d0ba80fd4e6a9ce2f3ca4fcf266a64e0:/cgit.c
diff --git a/cgit.c b/cgit.c
index 431e325..c16ed8c 100644
--- a/cgit.c
+++ b/cgit.c
@@ -536,6 +536,17 @@ static void choose_readme(struct cgit_repo *repo)
string_list_append(&repo->readme, filename)->util = ref;
}
+static void print_no_repo_clone_urls(const char *url)
+{
+ html("
| ");
+ html_txt(url);
+ html(" |
\n");
+}
+
static int prepare_repo_cmd(void)
{
unsigned char sha1[20];
@@ -586,6 +597,11 @@ static int prepare_repo_cmd(void)
cgit_print_docstart();
cgit_print_pageheader();
cgit_print_error("Repository seems to be empty");
+ if (!strcmp(ctx.qry.page, "summary")) {
+ html("| |
| Clone |
\n");
+ cgit_add_clone_urls(print_no_repo_clone_urls);
+ html("
\n");
+ }
cgit_print_docend();
return 1;
}
@@ -603,7 +619,7 @@ static int prepare_repo_cmd(void)
free(tmp);
return 1;
}
- sort_string_list(&ctx.repo->submodules);
+ string_list_sort(&ctx.repo->submodules);
cgit_prepare_repo_env(ctx.repo);
choose_readme(ctx.repo);
return 0;
@@ -997,7 +1013,7 @@ static void cgit_parse_args(int argc, const char **argv)
}
}
-static int calc_ttl()
+static int calc_ttl(void)
{
if (!ctx.repo)
return ctx.cfg.cache_root_ttl;