From cf86257ad71ed5d945d087c9418a5b3934cad773 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 14 Aug 2026 11:46:03 -1000 Subject: Remove the obsolete summary attributes --- source/ui-commit.c | 2 +- source/ui-empty.c | 2 +- source/ui-summary.c | 6 +++--- source/ui-tree.c | 8 ++++---- tests/t0105-commit.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/ui-commit.c b/source/ui-commit.c index d3ba703..4838210 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -113,7 +113,7 @@ void cgit_print_commit(char *hex, const char *prefix) cgit_print_layout_start(); cgit_print_diff_ctrls(); - html("\n"); + html("
\n"); print_ident_row("author", info->author, info->author_email, info->author_date, info->author_tz); print_ident_row("committer", info->committer, info->committer_email, diff --git a/source/ui-empty.c b/source/ui-empty.c index b5f90fc..a65f49b 100644 --- a/source/ui-empty.c +++ b/source/ui-empty.c @@ -35,7 +35,7 @@ void cgit_print_empty_repo(void) if (!ctx.repo->clone_url && !ctx.cfg.clone_prefix) return; - html("
"); + html("
\n"); html("\n"); cgit_add_clone_urls(print_clone_url); html("
Clone
\n"); diff --git a/source/ui-summary.c b/source/ui-summary.c index edcbc85..e4069c6 100644 --- a/source/ui-summary.c +++ b/source/ui-summary.c @@ -117,12 +117,12 @@ void cgit_print_summary(void) int columns = log_columns(); cgit_print_layout_start(); - html(""); + html("
\n"); cgit_print_branches(ctx.cfg.summary_branches); - htmlf("", columns); + htmlf("\n", columns); cgit_print_tags(ctx.cfg.summary_tags); if (ctx.cfg.summary_log > 0) { - htmlf("", columns); + htmlf("\n", columns); cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); } diff --git a/source/ui-tree.c b/source/ui-tree.c index 7df7375..cf3938e 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -87,7 +87,7 @@ static void print_linenumbers(const char *buf, unsigned long size) static void print_text_buffer(const char *filename, char *buf, unsigned long size) { - html("
 
 
 
 
\n"); + html("
\n"); if (ctx.cfg.enable_tree_linenumbers) { html("
");
@@ -131,8 +131,8 @@ static void print_binary_buffer(char *buf, unsigned long size)
 	char ascii[HEXDUMP_ROW_BYTES + 1];
 	struct strbuf row = STRBUF_INIT;
 
-	html("\n");
-	html("");
+	html("
ofshex dumpascii
\n"); + html("\n"); // At the default blob size limit a write per byte spent almost all of // its time in the kernel, so a row goes out in one write. @@ -406,7 +406,7 @@ static void ls_flush(struct walk_tree_context *walk) static void ls_head(void) { cgit_print_layout_start(); - html("
ofshex dumpascii
\n"); + html("
\n"); html(""); html(""); html(""); diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh index b26b4e3..ca41830 100755 --- a/tests/t0105-commit.sh +++ b/tests/t0105-commit.sh @@ -18,7 +18,7 @@ test_expect_success 'find commit subject' ' ' test_expect_success 'find commit msg' 'grep "
" tmp' -test_expect_success 'find diffstat' 'grep "
ModeName
" tmp' +test_expect_success 'find diffstat' 'grep "
" tmp' test_expect_success 'find diff summary' ' grep "1 file changed, 1 insertion, 0 deletions" tmp -- cgit v2.8.0