Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 16:58:50 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:45 +0300
commitbc726bd075929aab6b3e09d4dd5c2b0726fd5350 (patch)
tree8e4337a056037e0950944c1046c6f90d0d615bbb /notes.c
parent085390328f5fe1dfba67039b1fd6cc51546a4e41 (diff)
cocci: apply the "object-store.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "object-store.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/notes.c b/notes.c
index 750e18c400..e4dab62cad 100644
--- a/notes.c
+++ b/notes.c
@@ -786,7 +786,7 @@ static int prune_notes_helper(const struct object_id *object_oid,
struct note_delete_list **l = (struct note_delete_list **) cb_data;
struct note_delete_list *n;
- if (has_object_file(object_oid))
+ if (repo_has_object_file(the_repository, object_oid))
return 0; /* nothing to do for this note */
/* failed to find object => prune this note */
@@ -807,13 +807,15 @@ int combine_notes_concatenate(struct object_id *cur_oid,
/* read in both note blob objects */
if (!is_null_oid(new_oid))
- new_msg = read_object_file(new_oid, &new_type, &new_len);
+ new_msg = repo_read_object_file(the_repository, 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 = read_object_file(cur_oid, &cur_type, &cur_len);
+ cur_msg = repo_read_object_file(the_repository, cur_oid,
+ &cur_type, &cur_len);
if (!cur_msg || !cur_len || cur_type != OBJ_BLOB) {
free(cur_msg);
free(new_msg);
@@ -869,7 +871,7 @@ static int string_list_add_note_lines(struct string_list *list,
return 0;
/* read_sha1_file NUL-terminates */
- data = read_object_file(oid, &t, &len);
+ data = repo_read_object_file(the_repository, oid, &t, &len);
if (t != OBJ_BLOB || !data || !len) {
free(data);
return t != OBJ_BLOB || !data;
@@ -1264,7 +1266,7 @@ static void format_note(struct notes_tree *t, const struct object_id *object_oid
if (!oid)
return;
- if (!(msg = read_object_file(oid, &type, &msglen)) || type != OBJ_BLOB) {
+ if (!(msg = repo_read_object_file(the_repository, oid, &type, &msglen)) || type != OBJ_BLOB) {
free(msg);
return;
}