summaryrefslogtreecommitdiff
path: root/ui-blob.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-10-26 00:19:05 +0000
committerFreya Murphy <freya@freyacat.org>2025-10-26 00:19:05 +0000
commitc13abc67a816b12bf7ccb4395de03c802a832eb5 (patch)
tree565b3dd99c69d696b02a6cd4badd3fd917063760 /ui-blob.c
parentadd wiki support to cgit (diff)
downloadcgit-c13abc67a816b12bf7ccb4395de03c802a832eb5.tar.gz
cgit-c13abc67a816b12bf7ccb4395de03c802a832eb5.tar.bz2
cgit-c13abc67a816b12bf7ccb4395de03c802a832eb5.zip
git: update to v2.51.1HEADmaster
Diffstat (limited to 'ui-blob.c')
-rw-r--r--ui-blob.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui-blob.c b/ui-blob.c
index e554fe9..bc91656 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -56,7 +56,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
if (repo_get_oid(the_repository, ref, &oid))
goto done;
- if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
+ if (odb_read_object_info(the_repository->objects, &oid, &size) != OBJ_COMMIT)
goto done;
read_tree(the_repository,
repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)),
@@ -91,18 +91,18 @@ int cgit_print_file(char *path, const char *head, int file_only)
if (repo_get_oid(the_repository, head, &oid))
return -1;
- type = oid_object_info(the_repository, &oid, &size);
+ type = odb_read_object_info(the_repository->objects, &oid, &size);
if (type == OBJ_COMMIT) {
commit = lookup_commit_reference(the_repository, &oid);
read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
&paths, walk_tree, &walk_tree_ctx);
if (!walk_tree_ctx.found_path)
return -1;
- type = oid_object_info(the_repository, &oid, &size);
+ type = odb_read_object_info(the_repository->objects, &oid, &size);
}
if (type == OBJ_BAD)
return -1;
- buf = repo_read_object_file(the_repository, &oid, &type, &size);
+ buf = odb_read_object(the_repository->objects, &oid, &type, &size);
if (!buf)
return -1;
buf[size] = '\0';
@@ -147,13 +147,13 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
}
}
- type = oid_object_info(the_repository, &oid, &size);
+ type = odb_read_object_info(the_repository->objects, &oid, &size);
if ((!hex) && type == OBJ_COMMIT && path) {
commit = lookup_commit_reference(the_repository, &oid);
read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
&paths, walk_tree, &walk_tree_ctx);
- type = oid_object_info(the_repository, &oid, &size);
+ type = odb_read_object_info(the_repository->objects, &oid, &size);
}
if (type == OBJ_BAD) {
@@ -162,7 +162,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
return;
}
- 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(500, "Internal server error",
"Error reading object %s", hex);