From e77e6527eb0f3084498bec77cc13f9e1500218af Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:03:20 -0700 Subject: Count the log's columns in ui-log.c alone --- source/ui-summary.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'source/ui-summary.c') diff --git a/source/ui-summary.c b/source/ui-summary.c index ea31a9e..9972f76 100644 --- a/source/ui-summary.c +++ b/source/ui-summary.c @@ -17,23 +17,8 @@ #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 +26,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; } -- cgit