diff options
Diffstat (limited to 'ui-plain.c')
| -rw-r--r-- | ui-plain.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -24,13 +24,18 @@ static int print_object(const struct object_id *oid, const char *path) char *buf, *mimetype; unsigned long size; - type = oid_object_info(the_repository, oid, &size); - if (type == OBJ_BAD) { + struct object_info oi = { + .typep = &type, + .sizep = &size + }; + + if (odb_read_object_info_extended(the_repository->objects, oid, + &oi, OBJECT_INFO_LOOKUP_REPLACE) < 0 || type == OBJ_BAD) { cgit_print_error_page(404, "Not found", "Not found"); return 0; } - buf = repo_read_object_file(the_repository, oid, &type, &size); + buf = odb_read_object(the_repository->objects, oid, &type, &size); if (!buf) { cgit_print_error_page(404, "Not found", "Not found"); return 0; |
