- match_baselen = basedir_len(paths[0]);
- read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
- if (!match)
- html_status(404, "Not found", 0);
- else if (match == 2)
+ walk_tree_ctx.match_baselen = basedir_len(path_items.match);
+ read_tree_recursive(the_repository,
+ repo_get_commit_tree(the_repository, commit),
+ "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
+ if (!walk_tree_ctx.match)
+ cgit_print_error_page(404, "Not found", "Not found");
+ else if (walk_tree_ctx.match == 2)