diff --git a/cgit.c b/cgit.c index 02dddda..0ad8171 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("\n"); + cgit_add_clone_urls(print_no_repo_clone_urls); + html("
 
Clone
\n"); + } cgit_print_docend(); return 1; } diff --git a/ui-summary.c b/ui-summary.c index 46ca713..fa5ba04 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -28,7 +28,7 @@ static void print_url(const char *url) if (urls++ == 0) { htmlf(" ", columns); - htmlf("Clone\n", columns); + htmlf("Clone\n", columns); } htmlf("