From c13abc67a816b12bf7ccb4395de03c802a832eb5 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 26 Oct 2025 00:19:05 +0000 Subject: git: update to v2.51.1 --- git | 2 +- parsing.c | 2 +- shared.c | 2 +- ui-blame.c | 4 ++-- ui-blob.c | 14 +++++++------- ui-plain.c | 4 ++-- ui-snapshot.c | 2 +- ui-tree.c | 8 ++++---- ui-wiki.c | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/git b/git index c44beea..81f86aa 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit c44beea485f0f2feaf460e2ac87fdd5608d63cf0 +Subproject commit 81f86aacc4eb74cdb9c2c8082d36d2070c666045 diff --git a/parsing.c b/parsing.c index 5616d43..115ce81 100644 --- a/parsing.c +++ b/parsing.c @@ -200,7 +200,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag) const char *p; struct taginfo *ret = NULL; - data = repo_read_object_file(the_repository, &tag->object.oid, &type, &size); + data = odb_read_object(the_repository->objects, &tag->object.oid, &type, &size); if (!data || type != OBJ_TAG) goto cleanup; diff --git a/shared.c b/shared.c index 5605cf0..1c2d682 100644 --- a/shared.c +++ b/shared.c @@ -243,7 +243,7 @@ static int load_mmfile(mmfile_t *file, const struct object_id *oid) file->ptr = (char *)""; file->size = 0; } else { - file->ptr = repo_read_object_file(the_repository, oid, &type, + file->ptr = odb_read_object(the_repository->objects, oid, &type, (unsigned long *)&file->size); } return 1; diff --git a/ui-blame.c b/ui-blame.c index d07b67f..9c575ef 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -121,14 +121,14 @@ static void print_object(const struct object_id *oid, const char *path, struct blame_origin *o; struct blame_entry *ent = NULL; - type = oid_object_info(the_repository, oid, &size); + type = odb_read_object_info(the_repository->objects, oid, &size); if (type == OBJ_BAD) { cgit_print_error_page(404, "Not found", "Bad object name: %s", oid_to_hex(oid)); 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", oid_to_hex(oid)); 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); diff --git a/ui-plain.c b/ui-plain.c index 4d69607..0301439 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -24,13 +24,13 @@ 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); + type = odb_read_object_info(the_repository->objects, oid, &size); if (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; diff --git a/ui-snapshot.c b/ui-snapshot.c index 3e38cd5..d157222 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c @@ -192,7 +192,7 @@ static int write_sig(const struct cgit_snapshot_format *format, return 0; } - buf = repo_read_object_file(the_repository, note, &type, &size); + buf = odb_read_object(the_repository->objects, note, &type, &size); if (!buf) { cgit_print_error_page(404, "Not found", "Not found"); return 0; diff --git a/ui-tree.c b/ui-tree.c index 5368596..3e87fdb 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -127,7 +127,7 @@ static void print_object(const struct object_id *oid, const char *path, const ch unsigned long size; bool is_binary; - type = oid_object_info(the_repository, oid, &size); + type = odb_read_object_info(the_repository->objects, oid, &size); if (type == OBJ_BAD) { cgit_print_error_page(404, "Not found", "Bad object name: %s", oid_to_hex(oid)); @@ -138,7 +138,7 @@ static void print_object(const struct object_id *oid, const char *path, const ch if (mime) { is_binary = false; } else { - 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", oid_to_hex(oid)); @@ -259,7 +259,7 @@ static int ls_item(const struct object_id *oid, struct strbuf *base, ctx.qry.path ? "/" : "", name); if (!S_ISGITLINK(mode)) { - type = oid_object_info(the_repository, oid, &size); + type = odb_read_object_info(the_repository->objects, oid, &size); if (type == OBJ_BAD) { htmlf("Bad object: %s %s", name, @@ -286,7 +286,7 @@ static int ls_item(const struct object_id *oid, struct strbuf *base, } if (S_ISLNK(mode)) { html(" -> "); - buf = repo_read_object_file(the_repository, oid, &type, &size); + buf = odb_read_object(the_repository->objects, oid, &type, &size); if (!buf) { htmlf("Error reading object: %s", oid_to_hex(oid)); goto cleanup; diff --git a/ui-wiki.c b/ui-wiki.c index 9fdb4b9..9d52525 100644 --- a/ui-wiki.c +++ b/ui-wiki.c @@ -28,14 +28,14 @@ static void print_page(const struct object_id *oid, const char *path, const char unsigned long size; char *buf; - type = oid_object_info(the_repository, oid, &size); + type = odb_read_object_info(the_repository->objects, oid, &size); if (type == OBJ_BAD) { cgit_print_error_page(404, "Not found", "Bad object name: %s", oid_to_hex(oid)); 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", oid_to_hex(oid)); -- cgit v1.2.3-freya