diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Restyle the sources and fix the audit's findings
Diffstat (limited to 'source/ui-empty.c')
-rw-r--r--source/ui-empty.c15
1 file changed, 8 insertions, 7 deletions
diff --git a/source/ui-empty.c b/source/ui-empty.c
index cb91fbc..56ca6e1 100644
--- a/source/ui-empty.c
+++ b/source/ui-empty.c
@@ -1,15 +1,14 @@
/*
- * ui-empty.c: page shown for a repository that holds no commits
- *
- * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
- *
- * Licensed under GNU General Public License v2
- * (see LICENSE.txt for full license text)
+ * The page a repository with no commits falls back to, an error line and then
+ * the clone urls someone needs in order to push the first commit. cgit.c
+ * prints this in place of whatever page was asked for as soon as it finds
+ * there is no branch to resolve, so none of the ref driven pages ever run
+ * against an empty repository.
*/
#include "cgit.h"
-#include "ui-empty.h"
#include "html.h"
+#include "ui-empty.h"
#include "ui-shared.h"
static void print_clone_url(const char *url)
@@ -31,6 +30,8 @@ void cgit_print_empty_repo(void)
{
cgit_print_error("Repository seems to be empty");
+ // cgit_add_clone_urls draws on just these two, so with neither set the
+ // table below would be a Clone heading with no rows.
if (!ctx.repo->clone_url && !ctx.cfg.clone_prefix)
return;