diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-07-01 14:22:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-01 14:46:38 -0700 |
commit | d4ff88aee3967e5d1ef1237cd9b8792b7cdb304c (patch) | |
tree | 0951b639fd3ead92506db2216efb384e12bd6cc0 /notes.c | |
parent | e989dd96b8aa9b20b0e23d3fa845d0baba1b454a (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 'notes.c')
-rw-r--r-- | notes.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -816,15 +816,15 @@ int combine_notes_concatenate(struct object_id *cur_oid, /* read in both note blob objects */ if (!is_null_oid(new_oid)) - new_msg = repo_read_object_file(the_repository, new_oid, - &new_type, &new_len); + new_msg = odb_read_object(the_repository->objects, new_oid, + &new_type, &new_len); if (!new_msg || !new_len || new_type != OBJ_BLOB) { free(new_msg); return 0; } if (!is_null_oid(cur_oid)) - cur_msg = repo_read_object_file(the_repository, cur_oid, - &cur_type, &cur_len); + cur_msg = odb_read_object(the_repository->objects, cur_oid, + &cur_type, &cur_len); if (!cur_msg || !cur_len || cur_type != OBJ_BLOB) { free(cur_msg); free(new_msg); @@ -880,7 +880,7 @@ static int string_list_add_note_lines(struct string_list *list, return 0; /* read_sha1_file NUL-terminates */ - data = repo_read_object_file(the_repository, oid, &t, &len); + data = odb_read_object(the_repository->objects, oid, &t, &len); if (t != OBJ_BLOB || !data || !len) { free(data); return t != OBJ_BLOB || !data; @@ -1290,7 +1290,8 @@ static void format_note(struct notes_tree *t, const struct object_id *object_oid if (!oid) return; - if (!(msg = repo_read_object_file(the_repository, oid, &type, &msglen)) || type != OBJ_BLOB) { + if (!(msg = odb_read_object(the_repository->objects, oid, &type, &msglen)) || + type != OBJ_BLOB) { free(msg); return; } |