From d946c8cf11385f5766e827ae71b3fc798750a335 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Wed, 2 Apr 2025 21:00:51 +0200 Subject: Added default_index config parameter. Note: currently breaks repos that contain no readme --- ui-tree.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ui-tree.c') diff --git a/ui-tree.c b/ui-tree.c index 3d8a2eb..9fa265b 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -10,6 +10,7 @@ #include "cgit.h" #include "ui-tree.h" +// #include "ui-plain.h" #include "html.h" #include "ui-shared.h" @@ -127,10 +128,14 @@ static void print_object(const struct object_id *oid, const char *path, const ch return; } - if (is_binary) - print_binary_buffer(buf, size); - else + if (is_binary) { + //int print_object(const struct object_id *oid, const char *path) + //if (1) print_object(); + /*else*/ print_binary_buffer(buf, size); + } + else { print_text_buffer(basename, buf, size); + } free(buf); } -- cgit v1.2.3-70-g09d2