X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/073a8bb3963d53630826ee43f6feefb5a9660dc0..c1cd290d1f83d3d1c2d081d734e8d213f12cc06b:/ui-plain.c?ds=sidebyside diff --git a/ui-plain.c b/ui-plain.c index 8d541e3..cfdbf73 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -135,7 +135,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base, struct walk_tree_context *walk_tree_ctx = cbdata; if (base->len == walk_tree_ctx->match_baselen) { - if (S_ISREG(mode)) { + if (S_ISREG(mode) || S_ISLNK(mode)) { if (print_object(sha1, pathname)) walk_tree_ctx->match = 1; } else if (S_ISDIR(mode)) { @@ -185,7 +185,7 @@ void cgit_print_plain(void) cgit_print_error_page(404, "Not found", "Not found"); return; } - commit = lookup_commit_reference(oid.hash); + commit = lookup_commit_reference(&oid); if (!commit || parse_commit(commit)) { cgit_print_error_page(404, "Not found", "Not found"); return;