abouttreesummaryrefslogcommitdiff
path: root/ui-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-summary.c')
-rw-r--r--ui-summary.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 76f7df6..b3e5cc6 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -173,8 +173,7 @@ static int get_readme_oid_cb(const struct object_id *oid, struct strbuf *base,
return 0;
}
-const struct object_id * get_readme_oid(const struct object_id *oid, char **filename) {
- struct tree *tree = parse_tree_indirect(oid);
+const struct object_id * get_readme_oid(const struct tree *tree, char **filename) {
struct pathspec paths = {
.nr = 0
};
@@ -184,10 +183,10 @@ const struct object_id * get_readme_oid(const struct object_id *oid, char **file
return ctx.oid;
}
-void cgit_print_repo_readme_no_layout(const struct object_id *oid)
+void cgit_print_repo_readme_no_layout(const struct tree *tree)
{
char *filename = NULL;
- const struct object_id *readme_oid = get_readme_oid(oid, &filename);
+ const struct object_id *readme_oid = get_readme_oid(tree, &filename);
if (readme_oid) {
html("<div id='summary'>");
cgit_open_filter(ctx.repo->about_filter, filename);