From f2382990742bff816ec54883e6204ededc378e7f Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 6 Aug 2026 21:09:57 -1000 Subject: Settle the names, types and layout of the sources --- source/ui-log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/ui-log.c') diff --git a/source/ui-log.c b/source/ui-log.c index ff02d9a..5eb9a74 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -56,7 +56,7 @@ static void inspect_files(struct diff_filepair *pair) count_lines); } -void show_commit_decorations(struct commit *commit) +void cgit_print_commit_decorations(struct commit *commit) { const struct name_decoration *deco; static char buf[1024]; @@ -221,8 +221,8 @@ static void print_commit(struct commit *commit, struct rev_info *revs) /* line-wrap long commit subjects instead of truncating them */ size_t subject_len = strlen(info->subject); - if (subject_len > ctx.cfg.max_msg_len && - ctx.cfg.max_msg_len >= 15) { + if (ctx.cfg.max_msg_len >= 15 && + subject_len > (size_t)ctx.cfg.max_msg_len) { /* symbol for signaling line-wrap (in PAGE_ENCODING) */ const char wrap_symbol[] = { ' ', 0xE2, 0x86, 0xB5, 0 }; int i = ctx.cfg.max_msg_len - strlen(wrap_symbol); @@ -244,7 +244,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) } cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, oid_to_hex(&commit->object.oid), ctx.qry.vpath); - show_commit_decorations(commit); + cgit_print_commit_decorations(commit); html(""); cgit_open_filter(ctx.repo->email_filter, info->author_email, "log"); html_txt(info->author); -- cgit v2.8.0