From 4bf7dacfa870fb1fb81edf647fd5c049786c3c2f Mon Sep 17 00:00:00 2001 From: patrick-scho Date: Mon, 1 Dec 2025 15:12:11 +0100 Subject: print readme by oid try 1 --- ui-tree.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ui-tree.c') diff --git a/ui-tree.c b/ui-tree.c index 685503d..9cbed30 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -274,11 +274,11 @@ static void ls_head(void) html("\n"); } -static void ls_tail(const char *readme_path) +static void ls_tail(const struct object_id *oid) { html("\n"); - if (readme_path) - cgit_print_repo_readme_no_layout(readme_path); + if (oid) + cgit_print_repo_readme_no_layout(oid); cgit_print_layout_end(); } @@ -299,8 +299,7 @@ static void ls_tree(const struct object_id *oid, const char *path, struct walk_t ls_head(); read_tree_recursive(the_repository, tree, "", 0, 1, &paths, ls_item, walk_tree_ctx); - const char *readme_path = "readme.md"; - ls_tail(readme_path); + ls_tail(oid); } -- cgit v1.2.3