diff options
| m--------- | git | 0 | ||||
| -rw-r--r-- | parsing.c | 2 | ||||
| -rw-r--r-- | shared.c | 2 | ||||
| -rw-r--r-- | ui-blame.c | 4 | ||||
| -rw-r--r-- | ui-blob.c | 14 | ||||
| -rw-r--r-- | ui-plain.c | 4 | ||||
| -rw-r--r-- | ui-snapshot.c | 2 | ||||
| -rw-r--r-- | ui-tree.c | 8 | ||||
| -rw-r--r-- | ui-wiki.c | 4 |
9 files changed, 20 insertions, 20 deletions
diff --git a/git b/git -Subproject c44beea485f0f2feaf460e2ac87fdd5608d63cf +Subproject 81f86aacc4eb74cdb9c2c8082d36d2070c66604 @@ -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; @@ -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; @@ -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)); @@ -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); @@ -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; @@ -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("<tr><td colspan='3'>Bad object: %s %s</td></tr>", 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; @@ -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)); |