From 75450307c0c5a0fdf9826e5b06bdf252cfe22df0 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 20:14:48 -1000 Subject: Trim the comments and dead code across the tree --- source/ui-tree.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'source/ui-tree.c') diff --git a/source/ui-tree.c b/source/ui-tree.c index cbf783f..26a3fd1 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -53,10 +53,8 @@ struct only_child { }; /* - * A formatted write per line meant a syscall and a temporary buffer for every - * line of the file, so the anchors are handed over in batches. Building the - * column whole was rejected because it would come to several times the size of - * the blob. + * The anchors are handed over in batches rather than a write per line, and + * never built whole, which would come to several times the blob's size. */ static void print_linenumbers(const char *buf, unsigned long size) { @@ -109,8 +107,6 @@ static void print_text_buffer(const char *filename, char *buf, return; } - // Syntax highlighting ships as one of the filters under - // custom/extensions, which keeps knowledge of languages out of cgit. html("
");
 	html_txt(buf);
 	html("
\n"); @@ -134,8 +130,7 @@ static void print_binary_buffer(char *buf, unsigned long size) html("\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. + // A row goes out in one write rather than a write per byte. for (offset = 0; offset < size; offset += HEXDUMP_ROW_BYTES, buf += HEXDUMP_ROW_BYTES) { strbuf_reset(&row); @@ -424,7 +419,7 @@ static void ls_tail(void) cgit_print_layout_end(); } -static void ls_tree(const struct object_id *oid, const char *path, +static void ls_tree(const struct object_id *oid, struct walk_tree_context *walk) { struct tree *tree; @@ -518,7 +513,7 @@ void cgit_print_tree(const char *rev, char *path) walk.rev = xstrdup(rev); if (path == NULL) { - ls_tree(get_commit_tree_oid(commit), NULL, &walk); + ls_tree(get_commit_tree_oid(commit), &walk); goto cleanup; } -- cgit v2.8.0
ofshex dumpascii