summaryrefslogtreecommitdiff
path: root/builtin/notes.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-01 14:22:26 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-01 14:46:38 -0700
commitd4ff88aee3967e5d1ef1237cd9b8792b7cdb304c (patch)
tree0951b639fd3ead92506db2216efb384e12bd6cc0 /builtin/notes.c
parente989dd96b8aa9b20b0e23d3fa845d0baba1b454a (diff)
odb: rename `repo_read_object_file()`
Rename `repo_read_object_file()` to `odb_read_object()` to match other functions related to the object database and our modern coding guidelines. Introduce a compatibility wrapper so that any in-flight topics will continue to compile. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/notes.c')
-rw-r--r--builtin/notes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/notes.c b/builtin/notes.c
index 783d4932ca..a9529b1696 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -152,7 +152,7 @@ static void copy_obj_to_fd(int fd, const struct object_id *oid)
{
unsigned long size;
enum object_type type;
- char *buf = repo_read_object_file(the_repository, oid, &type, &size);
+ char *buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (buf) {
if (size)
write_or_die(fd, buf, size);
@@ -319,7 +319,7 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
strbuf_init(&msg->buf, 0);
if (repo_get_oid(the_repository, arg, &object))
die(_("failed to resolve '%s' as a valid ref."), arg);
- if (!(value = repo_read_object_file(the_repository, &object, &type, &len)))
+ if (!(value = odb_read_object(the_repository->objects, &object, &type, &len)))
die(_("failed to read object '%s'."), arg);
if (type != OBJ_BLOB) {
strbuf_release(&msg->buf);
@@ -722,7 +722,7 @@ static int append_edit(int argc, const char **argv, const char *prefix,
unsigned long size;
enum object_type type;
struct strbuf buf = STRBUF_INIT;
- char *prev_buf = repo_read_object_file(the_repository, note, &type, &size);
+ char *prev_buf = odb_read_object(the_repository->objects, note, &type, &size);
if (!prev_buf)
die(_("unable to read %s"), oid_to_hex(note));