Diff options
Diffstat (limited to '')
-rw-r--r--source/ui-summary.c24
1 file changed, 4 insertions, 20 deletions
diff --git a/source/ui-summary.c b/source/ui-summary.c
index f37650d..8cc48bf 100644
--- a/source/ui-summary.c
+++ b/source/ui-summary.c
@@ -10,30 +10,14 @@
#include "cgit.h"
#include "filter.h"
#include "html.h"
-#include "shared.h"
#include "ui-blob.h"
#include "ui-log.h"
#include "ui-refs.h"
#include "ui-shared.h"
#include "ui-summary.h"
-// Age, commit message and author, the three columns a log row always has.
-// ui-log.c adds one more for each of the two optional counts.
-#define LOG_BASE_COLUMNS 3
-
static int clone_urls_printed;
-static int log_columns(void)
-{
- int columns = LOG_BASE_COLUMNS;
-
- if (ctx.repo->enable_log_filecount)
- columns++;
- if (ctx.repo->enable_log_linecount)
- columns++;
- return columns;
-}
-
/*
* The sections share one table, which is as wide as the widest of them, and
* every row fills it, since a short row would end its stripe short of the
@@ -41,8 +25,8 @@ static int log_columns(void)
*/
static int table_columns(void)
{
- if (ctx.cfg.summary_log > 0 && log_columns() > REF_COLUMNS)
- return log_columns();
+ if (ctx.cfg.summary_log > 0 && cgit_log_columns(0) > REF_COLUMNS)
+ return cgit_log_columns(0);
return REF_COLUMNS;
}
@@ -96,7 +80,7 @@ void cgit_print_repo_readme(void)
// into safe HTML, so it is escaped rather than served raw.
html("<pre class='plaintext'>");
if (ref) {
- err = cgit_print_file(filename, ref, 1, 1);
+ err = cgit_print_file(filename, ref, 1);
} else {
struct strbuf sb = STRBUF_INIT;
if (strbuf_read_file(&sb, filename, 0) >= 0)
@@ -115,7 +99,7 @@ void cgit_print_repo_readme(void)
// through unescaped.
cgit_open_filter(ctx.repo->about_filter, filename, tree_base.buf, tree_query.buf);
if (ref)
- err = cgit_print_file(filename, ref, 1, 0);
+ err = cgit_print_file(filename, ref, 0);
else
html_include(filename);
cgit_close_filter(ctx.repo->about_filter);