diff options
context:
space:
mode:
Diffstat (limited to 'source/ui-tree.c')
-rw-r--r--source/ui-tree.c15
1 file changed, 5 insertions, 10 deletions
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("<td class='lines'><pre><code>");
html_txt(buf);
html("</code></pre></td></tr></table>\n");
@@ -134,8 +130,7 @@ static void print_binary_buffer(char *buf, unsigned long size)
html("<table class='bin-blob'>\n");
html("<tr><th>ofs</th><th>hex dump</th><th>ascii</th></tr>\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;
}