From 92e2cab96b8b8ea9a076dc279864226b3d0863e9 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Mon, 26 Apr 2021 01:02:50 +0000 Subject: Always use oidread to read into struct object_id In the future, we'll want oidread to automatically set the hash algorithm member for an object ID we read into it, so ensure we use oidread instead of hashcpy everywhere we're copying a hash value into a struct object_id. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- notes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'notes.c') diff --git a/notes.c b/notes.c index a19e4ad794..a44b25858f 100644 --- a/notes.c +++ b/notes.c @@ -352,7 +352,7 @@ static void add_non_note(struct notes_tree *t, char *path, n->next = NULL; n->path = path; n->mode = mode; - hashcpy(n->oid.hash, sha1); + oidread(&n->oid, sha1); t->prev_non_note = n; if (!t->first_non_note) { @@ -1134,7 +1134,7 @@ int remove_note(struct notes_tree *t, const unsigned char *object_sha1) if (!t) t = &default_notes_tree; assert(t->initialized); - hashcpy(l.key_oid.hash, object_sha1); + oidread(&l.key_oid, object_sha1); oidclr(&l.val_oid); note_tree_remove(t, t->root, 0, &l); if (is_null_oid(&l.val_oid)) /* no note was removed */ -- cgit v1.2.1