/* * ui-empty.c: page shown for a repository that holds no commits * * Copyright (C) 2006-2014 cgit Development Team * * Licensed under GNU General Public License v2 * (see LICENSE.txt for full license text) */ #include "cgit.h" #include "ui-empty.h" #include "html.h" #include "ui-shared.h" static void print_clone_url(const char *url) { html(""); html_txt(url); html("\n"); } /* * The caller has already prepared the repo environment, which the clone urls * need for macro expansion. */ void cgit_print_empty_repo(void) { cgit_print_error("Repository seems to be empty"); if (!ctx.repo->clone_url && !ctx.cfg.clone_prefix) return; html(""); html("\n"); cgit_add_clone_urls(print_clone_url); html("
Clone
\n"); }